Macro doesn't start up

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi all,
I wrote a simple code 'msgbox "workbook open"' and placed
it in workbook_open() and workbook_activate() events. I
saved and closed it as .xls. When I opened it again, the
message doesn't comes up.

I tried that with other files and it seems to work. Does
any one have any ideas/suggestions why this certain file
doesn't seem to run the macro at start up. I know that
open up a template won't activate the open() or activate
() events, but this is not a template file.

Thanks for any suggestions.

John.
 
Are you sure you put them in the correct location?

The both belong in the module under ThisWorkbook. (Not just a general module.)

ps. I saved a workbook with both these macros in them as a *.xlt file and
created a new workbook based on that template. Both events fired nicely.
 
Back
Top