![]() |
|
Forum
|
|
|
#1 (permalink) |
|
XLDnaute Occasionel
Date d'inscription: août 2005
Messages: 163
|
Hello le forum,
J'ai crée une barre d'outils personaliser avec des boutons dessus. Comment trouver le 'name' de ces boutons pour pouvoir agir dessus par code. Je voudrais les rendre inclicables (enabled=false) suivant des conditions. Merci d'avance pour votre aide. A+ Guillaume |
|
|
|
| ANNONCES | |||
|
|
|
|
#2 (permalink) |
|
XLDnaute Occasionel
Date d'inscription: avril 2005
Messages: 120
|
Clique droit sur la toolbar, ensuite clic droit sur l'icône qui te préoccupe.
Tu peux alors lui assigner ta propre macro et ton propre code. Par exemple: Sub SwitchTools() REM First check if the toolbar is shown or hidden If CommandBars('sampler').Visible Then REM Hide the toolbar and change the button image to 'normal' CommandBars('sampler').Visible = False CommandBars('switcher').Controls(1).State. = msoButtonUp Else REM Show the button and change the button image to 'selected' CommandBars('sampler').Visible = True CommandBars('switcher').Controls(1).State = msoButtonDown End If End Sub Message édité par: maxoverfred, à: 08/08/2005 15:19 |
|
|
|
|
|
#3 (permalink) |
|
XLDnaute Occasionel
Date d'inscription: août 2005
Messages: 163
|
re à tous, le forum, Maxoverfred,
Merci pour ta réponse rapide ton code ma aidé à démarrer. je l'ai donc transformé en : Code:
Application.CommandBars('ma bars').Controls('mon bouton').Enabled = False
A+ Guillaume |
|
|
|
| ANNONCES | |
![]() |
| Liens sociaux |
| Outils de la discussion | |
|
|