Discussion Locked

Excel - Run Macro when Workbook Opens

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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.

TIA,

Ivy Harrison harrisonivya@Uams.edu

1 reply

by juergen hartl

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.

This discussion is closed to new replies.