Mega Code Archive

 
Categories / VisualBasic Script / Application
 

Listing all controls on all toolbars

Sub ShowAllToolbarControls()     For Each myCommandBar In CommandBars         If myCommandBar.Type = msoBarTypeNormal Then             Debug.Print myCommandBar.name             For Each ctl In myCommandBar.Controls                 Debug.Print ctl.Caption             Next ctl         End If     Next myCommandBar End Sub