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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Time limited spreadsheet

Status
Not open for further replies.

eti3nne

MIS
Feb 5, 2004
102
Is it possible to set some sort of time/date limitation on a spreadsheet, after which time access would be barred (unless a password is entered to restart the period)?

Thanks for looking....
 
How about using the Workbook_Open() event to hide all worksheets, then check the date against a value stored in a very hidden sheet.

If date has not past then unhide the relevant sheets.

If date has past then an inputbox could invite entry of a password that is checked against value stored in a very hidden worksheet.....Invalid password closes the workbook.

If this is not secure enough for you then the workbook could simply close if the date is expired UNLESS a specific environment variable is found (?username?)or a second password protected workbook is open. In this case you would need to ensure that the workbook_save event hid all the worksheets (veryhidden). Also this type of security can be defeated if someone disables VBA from running






Gavin
 
Hi Gavin,

It would probably be better to use the Workbook_Open() event to unhide all worksheets if the 'use-by' date hasn't passed and the to Workbook_Close() event to hide (xlVeryHidden) all worksheets. That way, the user has to enable macros for anything to happen.

eti3nne: Do note that any measures you take to secure a workbook, short of using a compiler, can be easily circumvented.


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

Part and Inventory Search

Sponsor

Back
Top