MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Run Macro on Opening of Workbook

Posted by Kip on December 11, 2001 2:09 PM

I have designed a macro but cannot figure out how to get it to automatically run when I open the file it was designed for. This has got to be simple but can't figure it out. Any help would be appreciated.

Posted by Jim on December 11, 2001 2:21 PM

Hi Kip,
Private Sub Workbook_Open()
'Your code

Posted by Kim on December 11, 2001 2:21 PM

Name the macro Auto_Open and it will start when the file is opened.


Posted by Jacob on December 11, 2001 3:31 PM


You can also do this:

Private Sub Workbook_Open() (you macro name)
end sub()