Option Explicit
Sub ExploreCommandBars()
Dim bar As CommandBar
Dim lctlIndex As Long
Dim lPrintRow As Long
lPrintRow = 2
With Sheet1
For Each bar In Application.CommandBars
'If Not bar.BuiltIn And Not bar.Visible Then bar.Delete
'Stop
.Cells(lPrintRow, 1).Value = bar.Name
.Cells(lPrintRow, 2).Value = bar.Controls.Count
lPrintRow = lPrintRow + 1
For lctlIndex = 1 To bar.Controls.Count
.Cells(lPrintRow, 2).Value = bar.Controls(lctlIndex).Caption
.Cells(lPrintRow, 3).Value = bar.Controls(lctlIndex).ID
lPrintRow = lPrintRow + 1
Next
Next
End With
End Sub