I remember the old way was to save your macro in your Personal.xls
workbook - then it would be accessible
any time you opened Excel - has this changed for 2007?
That was a way. A better way was (and is) to create an Add-in, which you can then enable & disable via Tools->Add-ins. (An Add-in will remain enabled even if you close and re-start Excel). You can save any .XLS file as an Add-in (.XLA).
Within your Add-in you could just use an Auto_Open
method:
Private Sub Auto_Open()
DoStuff
End Sub
...or, you could hook up the Workbook_Open
event, as Ryan suggests.
Of course, since the user can disable the Add-in, you also want to do the reverse in Auto_Close
(or in the Workbook_BeforeClose
event).
Actually, if you use events it'd be better to use the Workbook_AddinInstall
and Workbook_AddinUninstall
events. Using those is slightly more "correct", and also has the benefit that the 'close' event doesn't fire if you close Excel and then hit Cancel when prompted to save.