View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default open file macros inactive

If you do this

Application.AutomationSecurity = msoAutomationSecurityForceDisable

Your macros will stop altogether.

Just try it and step through the code to see if it works. I guarantee it
will. You won't get an enable macro message and any workbook open code that
you have will not run.

Isn't that what you want?





"Alberto Ast" wrote:

Really the right word I should have used for what I need is macro disable.

"Barb Reinhardt" wrote:

Put this around your workbook open code

Application.AutomationSecurity = msoAutomationSecurityLow
'Workbook open code
Application.AutomationSecurity = msoAutomationSecurityByUI

HTH,
Barb Reinhardt

"Alberto Ast" wrote:

I need to open a file read only and macros inactive.

I know how to do read only but how to do macros inactives?