How Do I Create an Auto_Start Macro?

J

jim evans

I'm not experienced with Excel macros, but I'm trying to make a macro
that runs automatically when the spreadsheet opens. I thought all I
had to do was name it Auto_Start. Wrong! That doesn't work.

So, how do I do it?

jim
 
N

Nick Hodge

Jim

It's Auto_Open() and Auto_Close()

Both have now a replacement event handler which is the preferred method
however

workbook_open() and workbook_close() although these have to be set up in the
ThisWorkbook Class Module not a standard one as with Auto_Open()

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
[email protected]
 
J

jim evans

It's Auto_Open() and Auto_Close()

Both have now a replacement event handler which is the preferred method
however

workbook_open() and workbook_close() although these have to be set up in the
ThisWorkbook Class Module not a standard one as with Auto_Open()

Thanks very much for your helpful replies.

But, I can't figure out how to give a macro name a () suffix. I keep
getting a "Name not valid" error message.

jim
 
Top