I'm not sure how to do it but I seem to remember that in the old days of LOTUS 123 I could have an automatic macro that ran if anyone opened a spreadsheet.
If that macro compared todays date with an expiry date it could change the password for subsequent openings.
i.e. tomorrow it would have expired.
Come on you experts in VBA this should not be beyond you!!
Sure, I have programmed a workbook that 1) macros be enabled in order to make visible one or more sheets that make the workbook useable. And I suppose that a similar technique could be used to make certain sheets Very Hidden after a certain date.
But it does not make a file hidden. It can render a workbook unuseable.
Skip,
[sub]
Just traded in my old subtlety...
for a NUANCE![/sub]
I meant something more than save workbooks as .xlsm or .xlsb macro enabled workbooks.
When a macro enabled workbook is opened, IF the ENABLE MACROS question is either ignored or answered NO, then the sheets necessary to make the workbook useful REMAIN VERY HIDDEN. IF the ENABLE MACROS question is answered YES, then the Workbook_Open event makes the sheets necessary to make the workbook useful, VISIBLE, and then in this case, if the current date exceeds the expiry date, then the sheets necessary to make the workbook useful REMAIN VERY HIDDEN.
THAT is possible and we could advise in forum707, which is the appropriate forum for addressing VBA and macro issues.
Skip,
[sub]
Just traded in my old subtlety...
for a NUANCE![/sub]
Microsoft's Information Rights Management might get you close to your objective even though it won't make the file invisible. Here is a link to some basic information about this:
... and of course, all of this can be circumvented by changing the PC's clock.
If you just want a cheap and cheerful indication, you can add a large and obvious cell that says "This File Expired on 1st January 2010" and give it conditional formatting that hides it until 1st Jan 2010.
Be warned:
1. Anything you do to 'expire' a workbook so that the user's own data becomes inacessable renders you liable to being sued, and maybe even prosecuted.
2. Applying a time lock via a macro is quite easy to program but is even easier to circumvent and requires the end user's cooperation to implement (by allowing macros to run).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.