Running this will print the ID's for the controls of the specified
Menu/Toolbar in the VBE Immediate window
Public Sub ListControlIDs(strMenuName As String)
Dim mnuBar As CommandBar
Dim mnuControl As CommandBarControl
Set mnuBar = CommandBars(strMenuName)
Debug.Print "Control.ID"; Tab(12); "Type"; Tab(18); "Tag"; Tab(28);
"Caption"
Debug.Print "----------"; Tab(12); "----"; Tab(18); "---"; Tab(28);
"-------"
For Each mnuControl In mnuBar.Controls
Debug.Print mnuControl.ID; Tab(12); mnuControl.Type; Tab(18);
mnuControl.tag; Tab(28); mnuControl.Caption
Next mnuControl
Set mnuBar = Nothing
Set mnuControl = Nothing
End Sub
HTH,