Open wrkBook (auto_open) programmatically

S

Sean McPoland

Hi ya'll

right Office 2003,

I have a workbook with an Auto_Open Macro. I am opening
the Workbook subsequently in Power point VBA.

I have tried using READONLY = true and Editable= (T&F)
however the auto_open macro still executes.

How do I simulate the manual method of Open without
running Auto_Open macro in VBA?

I tried the Workbook.RunAutoOpen but that didn't seem to
work but that only works after the workbook is open
rather than at the Application level.

Your help gratefully received.

regards
Sean
 
T

Tom Ogilvy

Macros named Auto_Open do not run when the workbook is opened
programmatically. If you are finding something different, then this is
unexpected behavior. RunAutoOpen is a method provided to run the auto_open
macros after the workbook is opened programmatically.

Any macros in the Workbook_Open event will run regardless of how the
workbook is opened. These can be suppressed with application.EnableEvents =
False before opening in xl2002 and later. In xl2000 and xl97, you have to
run a macro in excel itself to issue this command.
 
S

Sean McPoland

Thanks Tom,

you hit it on the nail, it was the Enable Events I was
looking for - and yes my macro was in WorkBook_Open

regards
Sean
 
Top