Option Compare Text
Private Sub CommandButton1_Click()
Dim Col&
Col = Abs(OptionButton1 * 3 + OptionButton3 * 4 + OptionButton4 * 2 + OptionButton5 * 6)
If Col = 0 Or TextBox1 = "" Then Exit Sub
With Feuil1
If .FilterMode Then .ShowAllData
Set plage = .Range("A1:G" & .Cells(.Rows.Count, "A").End(xlUp).Row)
plage.AutoFilter Field:=Col, Criteria1:=TextBox1.Value
If plage.SpecialCells(xlCellTypeVisible).Count > plage.Columns.Count Then
Sheets.Add After:=Feuil1
plage.SpecialCells(xlCellTypeVisible).Copy: ActiveSheet.[a1].PasteSpecial Paste:=xlPasteValuesAndNumberFormats
Else
MsgBox "Aucune saisie pour " & TextBox1.Value, , "Information"
End If
plage.AutoFilter Field:=Col
End With
Unload UserForm2
End Sub