Barre d'outils dans un classeur: Recherche toutes les options pour changer les couleu

labricole14

XLDnaute Nouveau
Bonsoir à tous,:confused:

J'ai inclus dans un fichier une barre d'outils qui se crée à l'ouverture de celui-ci et qui se ferme à la fermeture de celui-ci.
Est-il possible de mettre en forme les boutons?
Changer la couleur de fond.
Changer la couleur de texte.
Je n'arrive pas à trouver toute les options que l'on peut utiliser pour mettre en forme cette barre.

Code utilisé:

Sub auto_open()
Dim barre As CommandBar
Dim bouton As CommandBarControl
Set barre = CommandBars.Add(Name:="PV_ERDF")
barre.Visible = True

Set bouton = CommandBars("PV_ERDF").Controls.Add(Type:=msoControlButton)
bouton.Style = msoButtonCaption
bouton.OnAction = "Macro1"
bouton.Caption = "Masquer Titre"

Set bouton = CommandBars("PV_ERDF").Controls.Add(Type:=msoControlButton)
bouton.Style = msoButtonCaption
bouton.OnAction = "Macro2"
bouton.Caption = "Afficher Titre"

Set bouton = CommandBars("PV_ERDF").Controls.Add(Type:=msoControlButton)
bouton.Style = msoButtonCaption
bouton.OnAction = "Macro3"
bouton.Caption = "Effacer"

Set bouton = CommandBars("PV_ERDF").Controls.Add(Type:=msoControlButton)
bouton.Style = msoButtonCaption
bouton.OnAction = "Macro4"
bouton.Caption = "Afficher Total"

Set bouton = CommandBars("PV_ERDF").Controls.Add(Type:=msoControlButton)
bouton.Style = msoButtonCaption
bouton.OnAction = "Macro5"
bouton.Caption = "Ajuster_affichage"

Set bouton = CommandBars("PV_ERDF").Controls.Add(Type:=msoControlButton)
bouton.Style = msoButtonCaption
bouton.OnAction = "Macro6"
bouton.Caption = "Début de saisie"

Set bouton = CommandBars("PV_ERDF").Controls.Add(Type:=msoControlButton)
bouton.Style = msoButtonCaption
bouton.OnAction = "Macro7"
bouton.Caption = "Insertion lignes"

Set bouton = CommandBars("PV_ERDF").Controls.Add(Type:=msoControlButton)
bouton.Style = msoButtonCaption
bouton.OnAction = "Macro8"
bouton.Caption = "Supprimer lignes"

Set bouton = CommandBars("PV_ERDF").Controls.Add(Type:=msoControlButton)
bouton.Style = msoButtonCaption
bouton.OnAction = "Macro9"
bouton.Caption = "texte_12"

Set bouton = CommandBars("PV_ERDF").Controls.Add(Type:=msoControlButton)
bouton.Style = msoButtonCaption
bouton.OnAction = "Macro10"
bouton.Caption = "texte_10"


Set bouton = CommandBars("PV_ERDF").Controls.Add(Type:=msoControlButton)
bouton.Style = msoButtonCaption
bouton.OnAction = "Macro11"
bouton.Caption = "texte_10"

Set bouton = CommandBars("PV_ERDF").Controls.Add(Type:=msoControlButton)
bouton.Style = msoButtonCaption
bouton.OnAction = "Macro12"
bouton.Caption = "texte_10"

Set bouton = CommandBars("PV_ERDF").Controls.Add(Type:=msoControlButton)
bouton.Style = msoButtonCaption
bouton.OnAction = " Macro12"
bouton.Caption = "xxxxxxx"


End Sub



Merci de votre aide
Cordialement
 
Dernière édition:

Discussions similaires

Statistiques des forums

Discussions
312 236
Messages
2 086 477
Membres
103 232
dernier inscrit
logan035