Execute procedure on startup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to automatically run a procedure from within Excel upon start
I know that if I put the .xls file into the the subdirectory XLStart tha
Excel will pull up the spreadsheet automatically, but then how do I the
automatically execute a designated procedure? Thanks for any help.
 
Richard

call the macro Auto_Start (in a general module) or use the Worksheet_Open
event (in the WorksheetClass Module)

Private Sub Workbook_Open()
:
End Sub


Regards

Trevor
 
Richard

In ThisWorkbook module.......

Private Sub Workbook_Open()
'your code here
End Sub

In a General module.......

Sub Auto_Open()
'your code here
End Sub

Gord Dibben Excel MVP
 
Apologies ... one or two senior moments there !

Gord has provided the correct options

Auto_Open

or Workbook_Open in the ThisWorkbook module
 
Back
Top