Private Sub TextBox1_Change()
Dim x$, y$, t, ncol%, i&, a(), j%, n&
x = TextBox1: y = TextBox14
t = Sheets("bd").[A1].CurrentRegion
ncol = UBound(t, 2)
For i = 2 To UBound(t)
If t(i, 2) <> "" And LCase(t(i, 2)) Like LCase(x) & "*" _
And t(i, 14) Like "*" & y & "*" Then
n = n + 1
ReDim Preserve a(1 To ncol, 1 To n)
For j = 1 To ncol
a(j, n) = t(i, j)
Next
End If
Next
If n = 0 Then ListBox1.Clear: Exit Sub
ReDim Preserve a(1 To ncol, 1 To n + 1) 'au moins 2 lignes
ListBox1.List = Application.Transpose(a)
ListBox1.RemoveItem n
End Sub
Private Sub TextBox14_Change()
TextBox1_Change
End Sub
Private Sub UserForm_Initialize()
Dim cw$
cw = "30;60;50;90;50;50;70;50;50;50;50;50;50;50;50" 'largeurs à adapter
ListBox1.ColumnWidths = cw
ListBox1.Width = Evaluate("SUM({" & cw & "})") + 4
Me.Width = ListBox1.Width + 18
TextBox1_Change
End Sub