go into the VBE (alt+F11) and in the project explorer on the left, select
ThisWorkbook entry under you workbook/project. Double click on it to get
the ThisWorkbook Module displayed. In this module at the top, in the left
dropdown, select Workbook and in the right dropdown, select Open. This will
put in the declaration for the workbook_Open event which fires when the
workbook is opened
Private Sub Workbook_Open()
End Sub
put your code or a call to your code in the above declaration.
--
Regards,
Tom Ogilvy
"simonjackson79" wrote in
message ...
I just wanted to know how to setup a macro to run as soon as the
spreadsheet is open. Can anyone help me with this?
Many thanks.
------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/