Julian has attended:
Excel VBA Intro Intermediate course
Perform deletions on Start up
I want to input a future date into a macro that performes a function when:
1. The workbook is opened, and
2. It recognises that the inputted date is today or has been passed
I guess it would be something like this:
The following written in the "Workbook" module
Public Sub DeleteSheetsDate ()
If Date => #25/12/2007# Then Worksheets("Sheets1") _
And Worksheets("Sheets1").Delete
End if
End Sub
Many thanks
Julian
RE: perform deletions on Start up
Hi Julian
Sorry for the delay in getting back to you but our offices have been closed over Christmas. We our now processing all of our forum posts, so we will get back to shortly with an answer for you question.
Thanks
David
RE: perform deletions on Start up
Sub auto_open()
If Now() > #12/11/2006# Then
Worksheets("Sheet1").Delete
End If
End Sub
this is the code but you must name it auto_open()