Web Development

General discussion


Excel - Run Macro when Workbook Opens

By Ivy ·
I designed a timesheet program the secretary uses. She clicks on a menu option I've added called Format Monthly. It creates a timesheet with an employees name, etc on it. She then clicks on Mail Monthly which emails this timesheet to the employee. Before emailing it, I append a menu item to this workbook. In the older version of Excel, the macro runs when the users open the workbook. In Excel XP, it no longer runs. The user has to click on the Macros and run it. How do I get it to run automatically when the user opens the workbook.


Ivy Harrison harrisonivya@Uams.edu

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by Juergen Hartl In reply to Excel - Run Macro when Wo ...

Start the excel spreadsheet, then open the VBA editor (ALT-F11) double click on ThisWorkbook, in the editor select Workbook (left dropdown) it should create a
Private Sub Workbook_open()

end Sub

macro. Type your code that needs to be run at opining the workbook.

Related Discussions

Related Forums