Private Sub CommandButton1_Click() 'bouton "Valider"
Dim O As Worksheet 'déclare la variable O (onglet)
Dim DL As Integer
Dim PL As Range
Dim TC() As Variant
Dim TEST As Boolean
Set O = Worksheets("Iris") 'définit l'onglet O
Set PL = O.Range("A1")
DL = O.Cells(Application.Rows.Count, "A").End(xlUp).Row
TC = Array("030110", "030112", "030113", "030114")
Application.ScreenUpdating = False
If OptionButton1.Value = True Then
For i = 2 To DL
If CStr(O.Cells(i, "F")) <> "100110" Then Set PL = IIf(PL.Cells.Count = 1, O.Rows(i), Application.Union(PL, O.Rows(i)))
Next i
PL.Delete
End If
If OptionButton2.Value = True Then
For i = 2 To DL
TEST = False
For J = 0 To 3
If CStr(O.Cells(i, "F")) = TC(J) Then TEST = True
Next J
If TEST = False Then Set PL = IIf(PL.Cells.Count = 1, O.Rows(i), Application.Union(PL, O.Rows(i)))
Next i
PL.Delete
End If
Application.ScreenUpdating = True
Unload Me
End Sub
Private Sub CommandButton2_Click() 'bouton "Sortir"
Unload Me 'vide et ferme l'UserForm
End Sub
Private Sub UserForm_Click()
End Sub