Sub auto_open()
On Error Resume Next
Set Barre = CommandBars.Add
Barre.Name = "BarreColoriage"
Barre.Visible = True
Set Menu = Barre.Controls.Add(msoControlComboBox)
Menu.AddItem "Choix1"
Menu.AddItem "Choix2"
Menu.AddItem "Choix3"
Menu.OnAction = "MaMacro"
Menu.Text = "Sélectionner puis choisir"
End Sub
Sub maMacro()
Application.ScreenUpdating = False
choix = CommandBars("BarreColoriage").Controls(1).Text
Select Case choix
Case "Choix1"
MsgBox "choix1"
Case "Choix2"
MsgBox "choix2"
End Select
End Sub
Sub auto_close()
On Error Resume Next
CommandBars("BarreColoriage").Delete
End Sub