Ajouter barre d'outil à excel

Résolu
cs_chris81 Messages postés 589 Date d'inscription jeudi 2 octobre 2003 Statut Membre Dernière intervention 29 avril 2008 - 11 oct. 2007 à 09:32
JM247L Messages postés 443 Date d'inscription mardi 27 mars 2007 Statut Membre Dernière intervention 1 mars 2011 - 11 oct. 2007 à 12:01
bonjour,
je cherche comment on crée une nouvelle barre d'outils pour excel et comment l'intégrer le tout par programmation.


merci




Indigo : Créateur de Classe VB.Net http://www.infosoft81.com/InfoSoft/Indigo/Deploiement/publish.htm
/FONT>

1 réponse

JM247L Messages postés 443 Date d'inscription mardi 27 mars 2007 Statut Membre Dernière intervention 1 mars 2011 2
11 oct. 2007 à 12:01
Salut
C'est du VBA mais ça peut aider

Dim FC_ToolsBar As CommandBar
Dim FC_ToolsBar_FC_Treatment As CommandBarButton
  Application.CommandBars.Add(Name:="Frame Contract - Tools Bar").Visible = True
  CommandBars("Frame Contract - Tools Bar").Position = msoBarTop
  Set FC_ToolsBar = CommandBars("Frame Contract - Tools Bar")
' Bouton
  Set FC_ToolsBar_FC_Treatment = FC_ToolsBar.Controls.Add(Type:=msoControlButton, ID:=548, Before:=1)
    With FC_ToolsBar_FC_Treatment
      .Caption = "Etiquette Du Bouton"
      .DescriptionText = ""
      .Style = msoButtonIconAndWrapCaptionBelow
      .OnAction = "Code A Exécuter"
    End With

' Traiter le cas ou le bouton ne doit pas être actif
   If 'Test' then
      With FC_ToolsBar_FC_Treatment
        .Enabled = False
      End With
    Else
      Exit Sub
    End If
  End If

 Cliquer "Réponse Acceptée"
JML - Partageons Notre Savoir & Nos Acquis
3
Rejoignez-nous