How to execute a macro automatically on startup

  • Thread starter Thread starter John Gilchrist
  • Start date Start date
J

John Gilchrist

Currently I execute a macro either with a short-cut key (^w) or a custom
menu entryon the TOOLS menu.

Is there any way to automatically execute the macro when excel starts up
(i.e. open excel to the desired workbook, and automatically run one of that
workbook's macros on startup. )

Thanks,
John G.
 
Open the workbook, do Alt + F11, double click ThisWorkbook in the left
project pane

Private Sub Workbook_Open()

End Sub


put either a reference to your macro like

Private Sub Workbook_Open()
Macro1
End Sub

or put the whole code in there
 
Back
Top