Bonjour

Je suis débutante en vba et j'ai pour "ambition" la création d'un petit programme de saisie . Malheureusement je bug
Je souhaiterai faire progresser une barre en fonction des cases cochées, attention il faut que la barre diminue si la case est décochée (erreur de saisie, ou modification de donnnées).
Hors c'est cette dernière partie qui me bloque, j'ai donc installé un bouton pour vider les cases mais j'aimerai que cette solution soit provisoire!!!.

J'ai donc :
1 Progressbar1
16 checkbox à cocher
Un label qui apparait lorsque toutes les check box sont cocher
Et le CommandButton8 pour vider mes check box en attendant de trouver mieux !

Si vous pouviez m'aider. d'avance merci


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
Private Sub TheProgressor()
    With Me.ProgressBar1
        Prog = .Value
        Prog = Prog + 6.25 
            If Prog <= 100 Then
                .Value = Prog
            End If
            If Prog = 100 Then Me.Label23.Visible = True
        End With
End Sub
 
Private Sub CommandButton8_Click()
Dim i As Byte
    For i = 1 To 16
        Me.Controls("CheckBox_" & i).Value = False
    Next
Me.ProgressBar1.Value = 0
CheckBox_1 = False
CheckBox_2 = False
CheckBox_3 = False
CheckBox_4 = False
CheckBox_5 = False
CheckBox_6 = False
CheckBox_7 = False
CheckBox_8 = False
CheckBox_9 = False
CheckBox_10 = False
CheckBox_11 = False
CheckBox_12 = False
CheckBox_13 = False
CheckBox_14 = False
CheckBox_15 = False
CheckBox_16 = False
 
Me.ProgressBar1.Value = 0
Label23.Visible = False
End Sub
 
Private Sub UserForm_Initialize()
With Me.ProgressBar1
.Min = 0
.Max = 100
End With
With Me
.Label23.Visible = False
End With
End Sub
Private Sub label23_Click()
Dim i As Byte
    For i = 1 To 16
    Next
Me.ProgressBar1.Value = 0
End Sub
 
 
Private Sub CheckBox_1_Click()
TheProgressor
End Sub
Private Sub CheckBox_2_Click()
TheProgressor
End Sub
Private Sub CheckBox_3_Click()
TheProgressor
End Sub
Private Sub CheckBox_4_Enter()
TheProgressor
End Sub
Private Sub CheckBox_5_Enter()
TheProgressor
End Sub
Private Sub CheckBox_6_Enter()
TheProgressor
End Sub
Private Sub CheckBox_7_Enter()
TheProgressor
End Sub
Private Sub CheckBox_8_Enter()
TheProgressor
End Sub
Private Sub CheckBox_9_Enter()
TheProgressor
End Sub
Private Sub CheckBox_10_Enter()
TheProgressor
End Sub
Private Sub CheckBox_11_Enter()
TheProgressor
End Sub
Private Sub CheckBox_12_Enter()
TheProgressor
End Sub
Private Sub CheckBox_13_Enter()
TheProgressor
End Sub
Private Sub CheckBox_14_Enter()
TheProgressor
End Sub
Private Sub CheckBox_15_Enter()
TheProgressor
End Sub
Private Sub CheckBox_16_Enter()
TheProgressor
End Sub