Here is example of how to create or delete Command bar button on runtime.
Option Explicit Sub del_faceID() On Error Resume Next Application.CommandBars("faceid").Delete On Error GoTo 0 End Sub Sub add_faceID() Dim cmdBar As CommandBar, bt As CommandBarButton, i& del_faceID Set cmdBar = Application.CommandBars.Add _ (Name:="faceid", temporary:=True) cmdBar.Visible = True For i = 1 To 1000 Set bt = cmdBar.Controls.Add(Type:=msoControlButton, ID:=2950) bt.FaceId = i: bt.Caption = i Next i End Sub