View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Enable Macros by Code

Try putting this BEFORE you open up your macro.

Application.AutomationSecurity = msoAutomationSecurityLow

If you want the user to later be requested to enable macros, change it back
to

Application.AutomationSecurity = msoAutomationSecurityByUI
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"aftamath77" wrote:

Is there code I can put in visual basic that will enable all macros when the
workbook opens, so there is no need to click the options for enable macros.

I know how to enable macros in the Trust Center, I would like to enable by
code.