startup macro

J

Jim

I remember from over 10 years ago that Excel used to have the ability
to automatically run a (startup) macro imbedded within a workbook when
the workbook was opened.

Does anyone know if this capability still exists in Excel 2000? If so,
how does one generate such a macro?

Thanks.
 
J

JE McGimpsey

Jim said:
I remember from over 10 years ago that Excel used to have the ability
to automatically run a (startup) macro imbedded within a workbook when
the workbook was opened.

Does anyone know if this capability still exists in Excel 2000? If so,
how does one generate such a macro?

This is a MacXL ng, but XL2000 works the same way.

Put your code in a Workbook_Open() event macro in the ThisWorkbook code
module of your workbook:

http://www.mcgimpsey.com/excel/modules.html

For example:

Private Sub Workbook_Open()
MsgBox "This fires when you open the workbook."
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top