PDA

View Full Version : autorun macro on opening workbook


Donna
11-06-2002, 08:28 AM
Hi

I want to write a macro in VB that will automatically run when you open up the workbook it lives in. (Like AutoExec in Access)

Is this possible? If so how do I do it?

Thanks in advance

Donna

PS I am talking about an Excel workbook.

ortizmro
11-06-2002, 08:51 AM
All you do is name the macro Auto_Open. So however you create it, just go to the macro with Alt + F8, click on desired macro, then click on Edit, then just change the name line to:

Sub Auto_Open()

MRO

Donna
11-06-2002, 08:57 AM
Thanks for your help.

:D