Web Development

General discussion


Excel - execute macro on opening

By jjoc11762 ·
I would like to automatically execute a macro whenever a workbook is opened.



This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -


by CharlieSpencer In reply to Excel - execute macro on ...

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.

Collapse -


by jjoc11762 In reply to F1

Thanks very much.
I am retired - used to manage the installation of PeopleSoft HR systems etc.

I am fooling around with VBA


Collapse -

On-Open event handler

by bschaettle In reply to Excel - execute macro on ...

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

Related Discussions

Related Forums