Macro doesn't start up

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.
 
D

Dave Peterson

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.
 

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