Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
Dim S As Worksheet
Dim R As Range
Dim var
Dim i&
If Client = "" Then Exit Sub
Set S = Sheets(FEUILLE_SOURCE)
S.Copy After:=Sheets(1)
Set S = ActiveSheet
S.Columns("H:I").Delete
S.Columns("E:F").Delete
S.Columns("A").Delete
S.Columns("C:C").Cut
S.Columns("A:A").Insert Shift:=xlToRight
S.Columns("C:C").Cut
S.Columns("B:B").Insert Shift:=xlToRight
var = S.[a1].CurrentRegion
For i& = UBound(var, 1) To 2 Step -1
If var(i&, 1) <> Client Or UCase(Trim(var(i&, 5))) <> "N" Then S.Rows(i&).Delete
Next i&
i& = S.[a1].CurrentRegion.Rows.Count
If i& > 1 Then
Set R = S.Range("a2:d" & i& & "")
With ListBox1
.ColumnCount = 4
.ColumnWidths = "80;80;80;80"
.ColumnHeads = True
.RowSource = R.Address
End With
End If
Application.DisplayAlerts = False
S.Delete
Application.DisplayAlerts = True
Client = ""
End Sub