Option Explicit
Option Compare Text

Private Sub ComboBox1_Change()
Me.TextBox1 = vbNullString
End Sub

Private Sub CommandButton2_Click()
Dim r As Integer, numfact As Integer

With Me.ListBox1
    If .ListIndex = -1 Then MsgBox "Vous n'avez rien sélectionné !", vbCritical, "Selection": Exit Sub
    numfact = .List(.ListIndex, 3) 'Numéro de FactLog
End With

r = Application.IfError(Application.Match(numfact, Range("TabSave[NumFactLog]"), 0), 0)

If r = 0 Then
    MsgBox "Erreur ## - Pas de NumFactLog", vbInformation, "Facture inexistante"
    Exit Sub
End If
With Sheets("Consultation")
    .Select
    .Range("F4") = numfact
    .Range("D6:D7") = Range("TabSave").ListObject.DataBodyRange(r, 5).Resize(r, 2).Value
End With
Unload Me
End Sub

Private Sub TextBox1_Change()
ListBox1.List = Range("Tabsave").ListObject.DataBodyRange.Value
If TextBox1 = vbNullString Then Exit Sub
Call Filtrerlist
End Sub

Private Sub UserForm_Initialize()
Dim i As Byte
With ListBox1
    .ColumnWidths = "60;80;80;80;50;50"
    .ColumnCount = 6
    .List = Range("Tabsave").ListObject.DataBodyRange.Value
End With
ComboBox1.List = Application.Transpose(Range("Tabsave").ListObject.HeaderRowRange.Resize(1, 6).Value)
End Sub

Sub Filtrerlist()
Dim i As Integer
Dim col As Byte

If ComboBox1.ListIndex = -1 Then Exit Sub
col = ComboBox1.ListIndex
For i = ListBox1.ListCount - 1 To 0 Step -1
    If Not ListBox1.List(i, col) Like "*" & TextBox1 & "*" Then
        ListBox1.RemoveItem (i)
    End If
Next i
End Sub
