Private Sub TextBox15_Change()
With ListBox1
.Clear
.ColumnCount = 14
.ColumnWidths = "98,50,65,110,37,33,70,55,55,35,35,108,125,130"
End With
Const Cont As Integer = 17
Me.ListBox1.ColumnCount = Cont
If TextBox15.Value = "" Then ListBox1.Clear: Exit Sub
Dim Ary()
Dim r As Long, rr As Long, Lr As Long
Dim c As Integer
Dim txt As String
txt = Me.TextBox15
Me.ListBox1.Clear
With Sheets("محمد")
Lr = .Cells(.Rows.Count, "D").End(xlUp).Row
For r = 7 To Lr
If InStr(CStr(.Cells(r, "D")), txt) Then
rr = rr + 1
ReDim Preserve Ary(4 To Cont, 1 To rr)
For c = 4 To Cont
Ary(c, rr) = .Cells(r, c).Value
Next
End If
Next
End With
If rr Then Me.ListBox1.Column = Ary
Erase Ary
End Sub