Bonjour,

dans le code suivant je rencontre un problème, en effet après divers test je me rend compte que ma variable compteur passe à la valeur de Total avant de faire les test des checkbox, quelqu'un à une idée ?

Merci d'avance :p

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
 
For Compteur = 2 To Total
    If ComboBox1.Value = Cells(Compteur, 1).Value Then
        Label2.Caption = Cells(Compteur, 4).Value
        Label3.Caption = Cells(Compteur, 5).Value
        Label4.Caption = Cells(Compteur, 6).Value
        Label5.Caption = Cells(Compteur, 7).Value
        Label6.Caption = Cells(Compteur, 8).Value
        Label7.Caption = Cells(Compteur, 9).Value
        Label8.Caption = Cells(Compteur, 10).Value
        ComboBox2.Enabled = True
        ComboBox2.Value = Cells(Compteur, 13).Value
 
        ' Commentaire
 
        If Cells(Compteur, 11).Value = "1" Then
            CheckBox1.Value = True
        End If
        If Cells(Compteur, 12).Value = "1" Then
            CheckBox2.Value = True
        End If
    End If
Next Compteur