1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| Sub BarreOutilsCourbe()
Dim BarreOutilsCourbe As CommandBar
Dim Bouton_BAO_Courbe As CommandBarButton
Dim Bouton_BAO_Planning As CommandBarButton
Dim Bouton_fenetre_choix As CommandBarButton
' Si cette barre d'outils existe, on la supprime
On Error Resume Next
Application.CommandBars("BarreOutilsCourbe").Delete
' Ajoute la barre de commande à la collection CommandBars
Set BarreOutils = Application.CommandBars.Add
BarreOutils.Name = "BarreOutilsCourbe"
' Ajoute le bouton de commande à la collection des contrôles de la barre
With BarreOutils.Controls
Set Zone_echelle_instantanée = .Add(msoControlEdit)
Set zone_echelle_cumule = .Add(msoControlEdit)
' Règle les propriétés du bouton de commande
With Zone_echelle_instantanée
.Caption = "échelle de pointage instantanée"
.OnAction = "action_zone1"
End With
With Zone_echelle_cumule
.Caption = "échelle de pointage cumulé"
.OnAction = "action_zone2"
End With
End With
BarreOutils.Enabled = True
BarreOutils.Visible = True
BarreOutils.Position = msoBarTop
End Sub |
Partager