Bonjour,
Au départ de l'action losque la colonne J est affichée, mon bonton foctionne à merveille.
Mais si au départ de l'action, la colonne J est masquée, je dois appuyer 2 fois sur le bouton et il y a un clignotement de l'écran, ensuite la macro focntionne.
J'ai testé plusieurs solution, mais je tourne en rond ...
Merci pour votre aide
Meilleures salutations
Philippe
ToggleButton_Planning.xlsm
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 ToggleButton_Planning_Click() If ToggleButton_Planning.Value = True Then ' ToggleButton_Planning.BackColor = vbGreen ToggleButton_Planning.Caption = "Afficher le PV" Liaisons_Dossier_Onglet_Divers.Activer_Afficher_que_le_planning 'End If Else ' If ToggleButton_Planning.Value = False Then ' ToggleButton_Planning.BackColor = vbRed ToggleButton_Planning.Caption = "Afficher le planning" Liaisons_Dossier_Onglet_Divers.Annuler_Afficher_que_le_planning 'afficher PV End If End Sub 'Private Sub UserForm_Initialize() ' If Columns("J").Hidden = False Then ' ToggleButton_Planning.BackColor = vbGreen ' ToggleButton_Planning.Caption = "Afficher le PV" ' End If ' If Columns("J").Hidden = False Then ' ToggleButton_Planning.BackColor = vbRed ' ToggleButton_Planning.Caption = "Afficher le planning" ' End If 'End Sub
Partager