Sub AllCommandBar()
Dim c1, c2, c3, c4, c5, s
On Error Resume Next
Cells.ClearContents
For Each c1 In CommandBars
For Each c2 In c1.Controls
For Each c3 In c2.Controls
For Each c4 In c3.Controls
For Each c5 In c4.Controls
s = s + 1
Cells(s, 1) = c1.NameLocal
Cells(s, 2) = c2.Caption
Cells(s, 3) = c3.Caption
Cells(s, 4) = c4.Caption
Cells(s, 5) = c5.Caption
Next c5
Next c4
Next c3
Next c2
Next c1
End Sub
这样吗