Option Explicit
Sub getFaceID()
Dim i As Long
Dim oCB As CommandBar
Dim oCBB As CommandBarButton
Dim oCBC As Variant
Dim arrFaceID As Variant
Dim oDic As Object
Dim iFaceId As Long
On Error Resume Next
Set oDic = CreateObject("Scripting.Dictionary")
For Each oCB In Excel.Application.CommandBars
With oCB
.Reset
For Each oCBC In .Controls
iFaceId = oCBC.FaceId
oDic.Add iFaceId, ""
Next
End With
Next
arrFaceID = oDic.keys
Set oCB = Excel.Application.CommandBars("Worksheet Menu Bar")
oCB.Reset
For i = 1 To UBound(arrFaceID)
Set oCBB = oCB.Controls.Add
With oCBB
.FaceId = arrFaceID(i)
.TooltipText = "FaceID:" & .FaceId
End With
Next i
End Sub