Auto_Open Check date and Close

  • Thread starter Thread starter DLS
  • Start date Start date
D

DLS

I need help in writing a macro that will check Today() against a set
date in a cell and if Today() is after that set date, then the
worksheet will immediately shut down. I want my auto_open macro to
call the date macro and then to do it's work if the worksheet is still
open. In other words, I only want users to be able to use the
worksheet until a certain date and after that date I want the
worksheet to shut down when they try to run it, or they will keep
using it. All help will be appreciated.
DLA
 
if they enable macros this will work



Private Sub Workbook_Open()

If Date = "8/1/03" Then
ActiveWindow.Close
End If

End Sub
 
Back
Top