Sub listCommandBars()
Dim comBar As CommandBar
Dim comBarType As String
For Each comBar In CommandBars
Select Case comBar.Type
Case msoBarTypeNormal
comBarType = "Toolbar"
Case msoBarTypeMenuBar
comBarType = "Menu Bar"
Case msoBarTypePopup
comBarType = "Shortcut"
End Select
Debug.Print comBar.Index, comBar.Name, comBarType, comBar.Visible
Next
End Sub
|