Bonjour,
Pouvez-vous m'aider afin de modifier ce code ?
Le UserForm1 est composé de trois OptionButton, ainsi que de deux checkbox.
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
24
25
26
27
28
29
30
31
32
33
34
35
36 Private Sub CommandButton1_Click() Dim StrMessage If CheckBox3.Value = True Then MsgBox "La fonction - Rapport - n'est pas encore disponible", vbInformation + vbOKOnly, "Information" End If If CheckBox2.Value = True Then If OptionButton1.Value = True Then Repartition_Jour_Tous Tableau_Analyse ElseIf OptionButton2.Value = True Then Repartition_Jour Tableau_Analyse ElseIf OptionButton3.Value = True Then Repartition_Jour_1 Tableau_Analyse Else Tableau_Analyse End If Else If OptionButton1.Value = True Then Repartition_Jour_Tous ElseIf OptionButton2.Value = True Then Repartition_Jour ElseIf OptionButton3.Value = True Then Repartition_Jour_1 Else MsgBox "Aucune case sélectionnée", vbInformation + vbOKOnly, "Information" End If End If Unload UserForm1 End Sub
Je veux ajouter la fonction qui est attribué à la checkbox3. (La macro qui devrait y être attaché se nomme (Rapport_Jour).
Cependant, cette Macro fonctionne à partir d'un tableau qui se créer à partir des données existantes dans les différences sheets de travail, c'est à dire qu'il y a un sens dans les opérations.
D'abord les options buttons, ensuite la checkbox2 qui déclanche la construction d'un tableau et pour finir la checkbox3 qui créer un rapport à partir du tableau.
Comment je peux créer cela ? En sachant que les checkbox ne sont pas obligatoire, d'oú le choix de checkbox.
Merci d'avance
Pour rappel, la macro qui se déclanche lorsqu'on check la box 3 est "Rapport_Jour". Donc il faut remplacer "MsgBox "La fonction - Rapport - n'est pas encore disponible", vbInformation + vbOKOnly, "Information""
Merci d'avance
Bàv,
Partager