Re : erreur next sans for
re,
En gras ce que j'ai modifié dans la procédure (n'hésite pas à revenir si problème):
Private Sub CommandButton3_Click()
Dim i As Long
Dim col1 As Byte
Dim col2 As Byte
Dim col3 As Byte
Dim vc As Double
If ComboBox1.Value = "" Or ComboBox3.Value = "" Or TextBox1.Value = "" Or ComboBox4.Value = "" Or ComboBox11.Value = "" Then
MsgBox " Vous Devez Remplir les Champs ", vbCritical, " ATTENTION "
Exit Sub
End If
col1 = Me.ComboBox2.ListIndex + 2
Stop
With Sheets("Feuil3")
DRL = .Range("A65500").End(xlUp).Row
For i = 2 To DRL
If .Cells(i, 1).Value = ComboBox1.Value Then
If ComboBox2.Value <> "" Then
If .Cells(i, col1).Value = "" Then
.Cells(i, col1).Value = 1
Else
vc = .Cells(i, col1).Value
.Cells(i, col1).Value = vc + 1
End If
End If
If ComboBox2.Value <> "" Then
If .Cells(i, col1).Value = "" Then
.Cells(i, col1).Value = 1
Else
vc = .Cells(i, col1).Value
.Cells(i, col1).Value = vc + 1
End If
End If
End If
Next i
.Columns.AutoFit
End With
Unload Me
End Sub