1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Private Sub Workbook_Open()
With Application.CommandBars(1).Controls.Add(msoControlPopup, , , 10)
.Caption = "Macro Perso"
With .Controls.Add(msoControlButton)
.Caption = "Trait. Fichier"
.FaceId = 505
.OnAction = "tableau2009"
.BeginGroup = False 'Permet de mettre des lignes de séparation si plusieurs Items
End With
End With
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
On Error Resume Next
Application.CommandBars(1).Controls("Macro Perso").Delete
End Sub |