Auto lock/Expire Excel 2007 Files

Posted on 2011-10-21
Last Modified: 2012-05-12

Is there a way to force a distributed Excel 2003/07 file to "expire" and tell the user they need to go download a new copy to continue?  I'd like to embed something in an excel workbook to make this happen.

I have a price book that I'm trying to force people to use the most recent copies, and they won't follow the guidance.

Your help is greatly appreciated!!

Question by:Marv1n
    LVL 83

    Expert Comment

    You can probably do this using a macro of VBA code. How exactly? I am not sure. I will try asking uncle google.
    LVL 27

    Accepted Solution

    I know of no way to do this without VBA.  Even then, it wouldn't prevent a user from opening a book with macros disabled and still view the data.  The idea would be to make it more convenient for the users to get the updated workbook than to hack the old one.

    You would have to modify the book so that all sheets have a "disclaimer" block (ex. a text box) that covers the pricing data.  All sheets should then be password protected so that these disclaimers can't be removed manually.

    You would then add an auto-run macro (Sub Workbook_AfterOpen() ) that would compare the current date to the expiration date and then either unlock sheets and remove disclaimers, or display a splash screen stating that the workbook has expired and that the user needs to update.

    LVL 27

    Expert Comment

    by:Glenn Ray
    The more I think about this, the less likely it seems possible that this is fully enforceable.  

    All a user would have to do is open the book once with macros (which would remove the disclaimers) then save it as a macro-free workbook (.xlsx).  They would then be able to open the book and use the pricing data regardless.

    Author Closing Comment


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
    The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now