Disable Macros when loading a Workbook in Excel 2000

  • Thread starter Thread starter Remy
  • Start date Start date
R

Remy

Hey
Is there a way to switch off macros when you open a workbook with Excel
2000 via Automation?
I know there is the
excelApp.AutomationSecurity =
soAutomationSecurity.msoAutomationSecurityForceDisable;
in Excel 2003, but that is not around for 2000 yet.
Also, setting
EnableEvents = false
is not working either. Seems to be a bug according to MS.

Thanks

Remy Blaettler
www.collaboral.com
 
Can you open the workbooks after you disable events:

dim wkbk as workbook
application.enableevents = false
set wkbk = workbooks.open(...)
application.enableevents = true

And if you do anything to the workbook, turn off events before you do it.

Wouldn't that be the equivalent of disabling macros???
 
I remember skimming by that thread. Thanks for the solution (I'll speak for the
OP!).
 
The problem is that the macro is executed in the Open event in Excel,
so until I can call a macro to switch of Macros, it's already too late.

Remy
 

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

Back
Top