Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make Excel file expire by certain date?

Status
Not open for further replies.

adfo

Programmer
Oct 23, 2009
30
US
I have a file in Excel 2010?

How can I create an expiry date for the file (let's say after 1 day).

if macro is required, how can I make it invisible?

Can this work with a file saved as a regular excel file (which I anticipate) not macro-enabled file?
 
See "Mission Impossible."

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
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]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
It would be my advice to save all your files in 2007 Excel as "macro enabled" so that they can all be seen on FILE OPEN, whatever they do.

Again the VBA programmers would be good at advising how to make a macro uneditable or hidden to users.

Maybe the point is to make the workbook eventually unusable once the macro has been enabled and the files sent to a recipients?

However, you should always have a none macroed backup copy squirreled away should the worst happen.
 
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]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/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:



Lyle
----
"For every expert, there is an equal and opposite expert." - Arthur C. Clarke.
 
... 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).

Cheers
Paul Edstein
[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top