السلام عليكم
جرب التعديل التالي
Private Sub CommandButton1_Click()
Dim V%, L_r%
Dim M
Dim Q, F, Rw
Dim Ar_r(), Ar()
Dim j&, L_rw, i&
ListBox1.Clear
On Error Resume Next
If TextBox1 = "" Then
ListBox1.Clear
Else
T = 0
M = Me.TextBox1
With Sheet1
L_r = .Cells(.Rows.Count, "B").End(xlUp).Row
Set Q = .Range("B3:B" & L_r).Find(M)
ReDim Preserve Ar_r(0 To 1000, 0 To 11)
If Not Q Is Nothing Then
F = Q.Address
Do
If WorksheetFunction.Search(M, Q, 1) = 1 Then
Ar = Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
For j = 0 To UBound(Ar)
ii = Ar(j)
Ar_r(T, j) = Q.Cells(1, ii)
Next j
T = T + 1
End If
Set Q = .Range("B3:B" & L_r).FindNext(Q)
Loop While Not Q Is Nothing And Q.Address <> F
For i = 0 To UBound(Ar_r, 1)
L_rw = 0
For j = 0 To 11
L_rw = Ar_r(i, j)
Next j
ReDim Preserve Ar_r(0 To i, 0 To j)
Ar_r(i, j) = L_rw
Next i
Me.ListBox1.List = Ar_r()
End If
End With
End If
End Sub