Question : Macro for a specific action

I am looking for a short Macro that would automatically check the internal clock time and date upon worksheet launch (not constantly, but just at launch time), and if a particular date was reached, a certain event or another macro would "fire".  The overall intent is to set up a spreadsheet with a date check that once reached, would automatically erase or delete a worksheet or a particular range.  This is for security purposes only.

Answer : Macro for a specific action

Use the Workbook_Open event:


Private Sub Workbook_Open()

If Now > dateserial(2010, 8, 27) Then destruct_macro

End Sub

Random Solutions  
 
programming4us programming4us