vba courses london - perform deletions start up
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum 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

The UK's most regular instructor-led training courses.
Training information: vba courses london · Excel london

resolvedResolved · Low Priority · Version Standard

Perform deletions on Start up

Julian has attended:
Excel VBA course

by - delegate Julian [3 posts] (2006 Dec 14 Thu, 12:54) replyReply

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

by - trainer David gold contributer[428 posts] (2007 Jan 2 Tue, 12:45) replyReply

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

by - trainer Garry gold contributer[188 posts] (2007 Jan 2 Tue, 16:48) replyReply

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()


Related articles

· How To Find A Good VB For Access Trainer
· Should You Send Managers To VBA Training?
· Company Roles in Visual Basic Training
· What Is Microsoft Excel VBA and How Can It Help You Work Smarter?
· Introduction to Visual Basic for Applications

Vba tip:

Suspend DisplayAlerts in VBA

To stop Excel asking you things like "Do you want to delete this file...", use the following line of code at the beginning of the relevant VBA procedure:

Application.DisplayAlerts = False

At the end of the procedure make sure you use the following code to reactivate Display Alerts:

Application.DisplayAlerts = True

View all VBA hints and tips

Institute of IT Training - Accredited Training Provider Microsoft Certified Partner
microsoft office
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information

Training Articles

AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz