Excel - execute macro on opening
I would like to automatically execute a macro whenever a workbook is opened.
Thanks
Joe
Web Development
I would like to automatically execute a macro whenever a workbook is opened.
Thanks
Joe
Aw c'mon, did you even -try- to use the built-in Help function? What are you a consultant on?
Click Help.
In the Search box, enter "macros".
In the Search results, click "Run a macro".
Now click "Have a macro run automatically..."
These steps are detailed for Excel 2003. The sequence may be different for other versions; your mileage may vary. Offer void where prohibited.
by jjoc11762
Thanks very much.
I am retired - used to manage the installation of PeopleSoft HR systems etc.
I am fooling around with VBA
Thanks
by bschaettle
Joe,
You need to code an event handler for the "Open" event of the workbook, which is really easy. Just paste this code into the VBA editor:
Private Sub Workbook_Open()
MsgBox "You opened the workbook."
End Sub
This discussion is closed to new replies.
Sort by Trending