98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft VBA Training and help » vba courses london - Perform deletions on Start up
vba courses london - Perform deletions on Start up
Resolved · Low Priority · Version Standard
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()
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
VBA tip:Count the Rows and Columns in a SelectionIf you need to count the number of rows or columns in a worksheet use the following code: |