PDA

View Full Version : Disable printing and macros from specific date



beegeebluebo
03-25-2010, 04:39 AM
I want to ensure uses a new version of my spreadsheet at a later date so I want to:

1
Prevent printing from a specific date

2
Prevent macro from running from a specific date.

Yes perhaps the user could change the system clock but then I would know that they must have done that if I see the output.

Is it possible?

Thanks

SamT
03-25-2010, 05:15 AM
Private Sub Workbook_Open()
If Date => Someday Then Me.Close
End Sub

beegeebluebo
03-25-2010, 10:12 AM
Thanks very much

mdmackillop
03-25-2010, 11:16 AM
You could also refer to Document Properties

Private Sub Workbook_Open()
If Date - ActiveWorkbook.BuiltinDocumentProperties("Creation date") > 7 Then
Me.Close
End If
End Sub

beegeebluebo
03-26-2010, 04:08 PM
You could also refer to Document Properties

Private Sub Workbook_Open()
If Date - ActiveWorkbook.BuiltinDocumentProperties("Creation date") > 7 Then
Me.Close
End If
End Sub



Thanks, bu if they use Save as don't they get a new Creation Date?