-
Expire on Set Date - And Prevent Rolling the Time Back
The simple code below will prevent the VBA from running after a certain fixed date. But that does not prevent the user from rolling back the date.
[VBA]
Private Sub Workbook_Open()
If Date > "10/25/2011 12:00:00 AM" Then
ActiveWorkbook.Close
Else
ActiveWorkbook.Activate
End If
End Sub
[/VBA]
Does anyone have code that would prevent the user from defeating this? I can think of creating a log file that would log each time it has been run. Then check for the oldest date. That way, if the user ever ran the file with an expired date, the roll back would not work.
The other option (which may be difficult) would be to use a web query for time. This could be done in the same way and the dates could be collected to see if there was any roll back.
I am hoping there may be something already out there (or something close) that I can work with?
-
Brian
Refer to your EMail
Rob
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules