Re : Suppression de lignes d'après les checkbox d'un userform
Bonjour,
J'ai essayé le code suivant qui ne me renvoie pas d'erreur, supprime pas mal de lignes mais pas toutes...une idée pour l'améliorer ?
Merci d'avance.
Dim i As Integer
For i = 300 To 9 Step -1
If Check1 = True And Not IsEmpty(Cells(i, 13).Value) Then
i = i - 1
ElseIf Check2 = True And Not IsEmpty(Cells(i, 14).Value) Then
i = i - 1
ElseIf Check3 = True And Not IsEmpty(Cells(i, 15).Value) Then
i = i - 1
ElseIf Check4 = True And Not IsEmpty(Cells(i, 16).Value) Then
i = i - 1
ElseIf Check5 = True And Not IsEmpty(Cells(i, 17).Value) Then
i = i - 1
ElseIf Check6 = True And Not IsEmpty(Cells(i, 18).Value) Then
i = i - 1
ElseIf Check7 = True And Not IsEmpty(Cells(i, 19).Value) Then
i = i - 1
ElseIf Check8 = True And Not IsEmpty(Cells(i, 20).Value) Then
i = i - 1
ElseIf Check9 = True And Not IsEmpty(Cells(i, 21).Value) Then
i = i - 1
ElseIf Check10 = True And Not IsEmpty(Cells(i, 22).Value) Then
i = i - 1
Else: Rows(i).Delete
End If
Next i