Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I launch excel that runs a macro automatically?

Status
Not open for further replies.

pkmoore

Programmer
Sep 24, 2002
8
US
I am trying to use Windows Schedular to launch Excel and run a macro (VB Procedure) that I wrote. I'm having trouble finding out how to do this.

Please help!!
 
Use the scheduler to open Excel with a particular workbook. Add a workbook_open event handler to your workbook, which calls the macro you want to run. This will happen automatically when the workbook is loaded.
If you need help with any of these steps, just ask.
Rob
[flowerface]
 
Try this, I use it to force a splash screen when excel opens up.

in the 'This Workbook' object module (with the worksheets) place a procedure like this

Private Sub WORKBOOK_OPEN()
' your code here
End Sub

You can name yours what ever you want to but the _Open() has to be the same, as Excel will look into the This WorkBook object module to see if there is any code with the _Open() if so it will launch it first.

Hope this helps ya [morning]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top