Sub IDMenu()
Dim C As CommandBarControl
For Each C In CommandBars("Worksheet Menu Bar").Controls
MsgBox C.Caption & "-" & C.ID
Next C
End Sub
Sub FindControlID()
Dim B As Object, Nb As Integer
Nb = Application.CommandBars.Count
[A1].Resize(, 2).Value = Array("Caption", "ID")
For X = 1 To Nb
For Each B In Application.CommandBars.Item(X).Controls
With [A65536].End(xlUp).Offset(1)
.Value = B.Caption
.Offset(, 1).Value = B.ID
End With
Next
Next
Range("A1:B1").EntireColumn.AutoFit
Set a = Nothing: Set B = Nothing
End Sub
J'ai trouvé, sur un site, une soluce qui génère une liste. Voici la macro