Microsoft KB Archive/68722

{|
 * width="100%"|

Attaching Auto_Open Macros to Templates in Excel 3.00

 * }

-

The information in this article applies to:


 * Microsoft Excel for Windows, versions 3.0, 4.0, 4.0a, 5.0

-

SUMMARY
Auto_Open and Auto_Close macros defined on a template will be defined on every new sheet based on that template.

MORE INFORMATION
In the example below, the macro sheet EXAMPLE.XLM contains the following macros:

  A1: Start_Up A2: =ALERT(&quot;Good Morning&quot;,1) A3: =RETURN

On the template MYFILES.XLT, Auto_Open has been defined as &quot;=EXAMPLE.XLM!Start_Up&quot;.

Each time a new sheet is created based on the template MYFILES.XLT, the Auto_Open macro Start_Up will run, displaying the an Alert box with the message &quot;Good Morning&quot;.