Auto macros

  • Thread starter Thread starter Ulf Nilsson
  • Start date Start date
U

Ulf Nilsson

Hi,
In Word, one can user Sub AutoOpen to run a Sub when the
document is opened. How is this done in Excel?

/ Ulf
 
Hi
two ways:
either place your code in the workbook even: workbook_open (has to be
put in the workbook module) or name your macro Auto_Open()
 
Correction of a few typos:

either place your code in the workbook event: workbook_open (has to be
put in the Thisworkbook module) or name your macro Auto_Open() and place it
in a standard module
 
Tom said:
Correction of a few typos:

either place your code in the workbook event: workbook_open (has to be
put in the Thisworkbook module) or name your macro Auto_Open() and
place it in a standard module

:-)
thanks for the correction
regards
Frank
 
Just a note. I am using Office XP (2002), and the
Workbook Open event is being triggered only when I first
open Excel, and then open the workbook. If I close, then
reopen the workbook without closing Excel, the Workbook
Open event is not firing. I don't yet know if this is a
problem with my installation, or with Office XP.
 
Back
Top