How to have an Excel file not open after a certain date

B

Blah

How could I have an Excel file not open after a set date? The people
that would use the Excel file are not the sharpest tools in the
drawer, so I was looking to have the file not open after a specific
date I could set.

Many thank in advance!!
 
B

Bernard Liengme

How about a workbook macro that hides all the sheets when the file is opened
after a certain date?
Would that work for you?
 
G

Guest

Bernard, I tried creating a macro to do this, but when it got to hiding the
last sheet, it gave an error that the workbook had to have at least one
visible worksheet. The macro could give a warning to the user and close.

Private Sub Workbook_Open()
Dim myDate As Date
Dim WS As Worksheet
myDate = "8/23/2007"
If myDate < Date Then
MsgBox ("This workbook can't be used after " & myDate & vbNewLine & _
"The workbook will now be closed.")
ThisWorkbook.Close
End If
End Sub

Of course, the user could get around this by not allowing macros to run.
 
D

David McRitchie

So the solution is simple, create another worksheet that is
hidden with the appropriate content on it. When the time comes
unhide it and hide all the others, and I expect you would be wise
not to block access to data that belongs to someone else.
 
D

David McRitchie

So the solution is simple, create another worksheet that is
hidden with the appropriate content on it. When the time comes
unhide it and hide all the others, and the original poster would be
wise to not block access to data that belongs to someone else.
 
B

Bob Flanagan

Not really possible - all the user has to do is to open the file with
macros disabled. And, if they need to, buy a password cracker, look at your
code, and open any referenced workbook.
 
B

Blah

Thanks for all of the info.

Is there a way to disable an Excel file from working after a certain
date/ after a certain amount of time? The file is password protected,
but I realize that there are password crackers. Any way to minimize
the cracking of a file? (Anything I can do to work around the password
crackers?)
 
B

Bob I

Perhaps a "timed" "delete all" macro?
Thanks for all of the info.

Is there a way to disable an Excel file from working after a certain
date/ after a certain amount of time? The file is password protected,
but I realize that there are password crackers. Any way to minimize
the cracking of a file? (Anything I can do to work around the password
crackers?)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top