Macro Security

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In VBA how can I open the Macro Security dialogue which is on the
Tools/Macro/MacroSecurity menu.

Thanks in advance.
 
Angus said:
In VBA how can I open the Macro Security dialogue which is on the
Tools/Macro/MacroSecurity menu.

You may need to set a reference to the Office 11.0 library.

Dim CmdBar As CommandBar
Dim CmdBarPopup As CommandBarPopup

Set CmdBar = Application.CommandBars("Menu Bar")
Set CmdBarPopup = CmdBar.Controls("Tools")
Set CmdBarPopup = CmdBarPopup.Controls("Macro")
CmdBarPopup.Controls("Security...").Execute
Set CmdBarPopup = Nothing
Set CmdBar = Nothing
 
Back
Top