Hello.
When I open an visio document I want some toolbars to be disabled (this is for a template that I am
trying to make). I use the following vba code but it does not even run. Can anyone help me?
--------------------------------------------------
Private Sub Document_DocumentOpened(ByVal doc As IVDocument)
Dim cbars As CommandBars
Dim cbar1 As CommandBar
Dim cbar2 As CommandBar
Set cbars = Application.CommandBars
Set cbar1 = cbars("Standard"
Set cbar2 = cbars("Formatting"
'Disable the command bars
cbar1.Enabled = False
cbar2.Enabled = False
End Sub
When I open an visio document I want some toolbars to be disabled (this is for a template that I am
trying to make). I use the following vba code but it does not even run. Can anyone help me?
--------------------------------------------------
Private Sub Document_DocumentOpened(ByVal doc As IVDocument)
Dim cbars As CommandBars
Dim cbar1 As CommandBar
Dim cbar2 As CommandBar
Set cbars = Application.CommandBars
Set cbar1 = cbars("Standard"
Set cbar2 = cbars("Formatting"
'Disable the command bars
cbar1.Enabled = False
cbar2.Enabled = False
End Sub