Public Const Nm As String = "My Excel Add-in"
'This procedure would be performed when the workbook is opened.
'This procedure would be performed when the workbook is closed.
Private Sub CreateBar()
Dim Bar As CommandBarPopup
Dim BarBtn As CommandBarButton
Dim i As Integer
'Just in case Delete menu
'Set Tools menu as an object variable
Set Bar = _
.BeginGroup = True 'Add a line for partition
.Caption = "&Converter addin"
.Tag = Nm
For i = 1 To 2
Set BarBtn = .Controls.Add(msoControlButton)
'Change here to change the caption on the menu
.Caption = Choose(i, "Give it a try #1", "Give it a try #2")
'Change here to change the procedure that shoud be called
.OnAction = Choose(i, "Test", "Test2")
.FaceId = Choose(i, 2892, 487) 'Use face ID
.BeginGroup = Choose(i, False, False)
Private Sub DeleteBar()
On Error Resume Next
On Error GoTo 0
MsgBox "Works well?"