Gregor

How to hide unhide ProcessBook Toolbars using VBA?

Discussion created by Gregor on Dec 1, 2008
Latest reply on Mar 24, 2011 by dhollebeek

To start filling VCampus with live, I thought it would be a good idea to post what I have learned today by answering a Technical Support request.

 

For browsing through the Toolbars, retrieve their indexes, names and current visibilty status the following code can be used:

Private Sub CommandButton1_Click()
    Dim i As Integer
    For i = 1 To Application.CommandBars.Count
        MsgBox (i & " - " & _
                Application.CommandBars.Item(i).Name & _
                ": " & _
                Application.CommandBars.Item(i).Visible)
    Next i
End Sub

The following code can be used to hide / unhide a specific toolbar selecting it by its index i.e. the Fullscreen toolbar:

Private Sub CommandButton2_Click()
    ' True = unhide / False = hide
    Application.CommandBars.Item(8).Visible = False
End Sub

Outcomes