Mega Code Archive

 
Categories / VisualBasic Script / Application
 

Properties of CommandBar controls

Sub ShowShortcutMenuItems()   Dim myCommandBar As CommandBar   Dim Ctl As CommandBarControl   Application.ScreenUpdating = False   For Each myCommandBar In Application.CommandBars     If myCommandBar.Type = msoBarTypePopup Then       Debug.Print  myCommandBar.Index       Debug.Print  myCommandBar.Name       For Each Ctl In myCommandBar.Controls         If Ctl.Visible Then           Debug.Print  Ctl.Caption         Else           Debug.Print  "<" & Ctl.Caption & ">"         End If      Next Ctl    End If   Next myCommandBar End Sub