Bonjour amis du forum
J'ai un problème étrange avec le code que j'ai créé.
Mon projet propose à une personne de cocher des cases parmi un choix de neuf, et selon la combinaison obtenue, un score s'affiche.
Mon problème est celui-ci: lorsque je coche la case 6 et ensuite la case 1, le score 9 s'affiche (ce qui est correcte), mais lorsque je fais le contraire, (cocher la case 1 en premier lieu et ensuite la case 6), rien ne se passe!!!
Voici le code
Merci beaucoup!!!
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116 Private Sub CheckBox1_Click() 'Case #1 If (CheckBox1.Value = True) And _ (CheckBox2.Value = False) And _ (CheckBox3.Value = False) And _ (CheckBox4.Value = False) And _ (CheckBox5.Value = False) And _ (CheckBox6.Value = True) And _ (CheckBox7.Value = False) And _ (CheckBox8.Value = False) And _ (CheckBox9.Value = False) Then Range("M9").Value = 9 'Case #2 Else If (CheckBox1.Value = True) And _ (CheckBox2.Value = False) And _ (CheckBox3.Value = False) And _ (CheckBox4.Value = False) And _ (CheckBox5.Value = False) And _ (CheckBox6.Value = False) And _ (CheckBox7.Value = True) And _ (CheckBox8.Value = False) And _ (CheckBox9.Value = False) Then Range("M9").Value = 8 'Case #3 Else If (CheckBox1.Value = False) And _ (CheckBox2.Value = True) And _ (CheckBox3.Value = False) And _ (CheckBox4.Value = False) And _ (CheckBox5.Value = False) And _ (CheckBox6.Value = True) And _ (CheckBox7.Value = False) And _ (CheckBox8.Value = False) And _ (CheckBox9.Value = False) Then Range("M9").Value = 7 'Case #4 Else If (CheckBox1.Value = False) And _ (CheckBox2.Value = True) And _ (CheckBox3.Value = False) And _ (CheckBox4.Value = False) And _ (CheckBox5.Value = False) And _ (CheckBox6.Value = False) And _ (CheckBox7.Value = True) And _ (CheckBox8.Value = False) And _ (CheckBox9.Value = False) Then Range("M9").Value = 6 'Case #5 Else If (CheckBox1.Value = True) And _ (CheckBox2.Value = False) And _ (CheckBox3.Value = False) And _ (CheckBox4.Value = False) And _ (CheckBox5.Value = False) And _ (CheckBox6.Value = False) And _ (CheckBox7.Value = False) And _ (CheckBox8.Value = False) And _ (CheckBox9.Value = True) Then Range("M9").Value = 5 'Case #6 Else If (CheckBox1.Value = True) And _ (CheckBox2.Value = False) And _ (CheckBox3.Value = False) And _ (CheckBox4.Value = False) And _ (CheckBox5.Value = False) And _ (CheckBox6.Value = False) And _ (CheckBox7.Value = True) And _ (CheckBox8.Value = False) And _ (CheckBox9.Value = True) Then Range("M9").Value = 4 'Case #7 Else If (CheckBox1.Value = False) And _ (CheckBox2.Value = True) And _ (CheckBox3.Value = False) And _ (CheckBox4.Value = False) And _ (CheckBox5.Value = False) And _ (CheckBox6.Value = False) And _ (CheckBox7.Value = False) And _ (CheckBox8.Value = False) And _ (CheckBox9.Value = True) Then Range("M9").Value = 3 'Case #8 Else If (CheckBox1.Value = False) And _ (CheckBox2.Value = True) And _ (CheckBox3.Value = False) And _ (CheckBox4.Value = False) And _ (CheckBox5.Value = False) And _ (CheckBox6.Value = False) And _ (CheckBox7.Value = True) And _ (CheckBox8.Value = False) And _ (CheckBox9.Value = True) Then Range("M9").Value = 2 End If End If End If End If End If End If End If End If End Sub
Partager