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,
try:
Private Sub Workbook_Open()
'Your code
HTH
Jim

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

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

Kim



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

Hi

You can also do this:

Private Sub Workbook_Open()
application.run (you macro name)
end sub()