Private Sub CommandButton1_Click()
Unload UserForm1
End Sub
Private Sub CommandButton2_Click()
Dim Fl1 As Worksheet, Fl2 As Worksheet
Dim Cbx As Control
Set Fl1 = Sheets("Feuil1")
Set Fl2 = Sheets("Feuil2")
Fl1.Range("A1:E" & Fl1.[A65000].End(xlUp).Row).Name = "base"
With Fl2
.Cells.Clear
.[H1] = Fl1.[A1]
For Each Cbx In Me.Controls
If TypeOf Cbx Is MSForms.CheckBox Then
If Cbx Then Fl2.[H65000].End(xlUp)(2) = Right(Cbx.Caption, Len(Cbx.Caption) - 3)
End If
Next Cbx
Fl1.Range("base").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=.Range( _
"H1:H" & .[H65000].End(xlUp).Row), CopyToRange:=.Range("A1"), Unique:=False
.Columns(8).Clear
.Select
End With
'Unload Me
End Sub