P
pinkfloydfan
Hi guys
I have a spreadsheet to which I have added the following code in the
auto_open routine:
Sub auto_open()
Dim mydate As Date
mydate = "10-Nov-2006"
If mydate < today Then
MsgBox ("Project expired on " & mydate & vbCrLf & "Press OK to
exit")
ActiveWorkbook.Close
End If
End Sub
The point of this is to add an expiry time to the spreadsheet such that
if today>mydate then the workbook is closed and it can no longer be
used.
Unfortunately, if the user has macro security set to medium then they
get the option of disabling the macros before running the auto_open
routine...does anybody know a better way to deal with this for me
please?
I have a spreadsheet to which I have added the following code in the
auto_open routine:
Sub auto_open()
Dim mydate As Date
mydate = "10-Nov-2006"
If mydate < today Then
MsgBox ("Project expired on " & mydate & vbCrLf & "Press OK to
exit")
ActiveWorkbook.Close
End If
End Sub
The point of this is to add an expiry time to the spreadsheet such that
if today>mydate then the workbook is closed and it can no longer be
used.
Unfortunately, if the user has macro security set to medium then they
get the option of disabling the macros before running the auto_open
routine...does anybody know a better way to deal with this for me
please?