Private Sub TextBox1_Change()
Dim Itm As ListItem
Dim r As Integer
Dim i As Integer
' Dim c As Integer
' r = Cells(Rows.Count, 1).End(xlUp).Row
On Error Resume Next
With ListView1
.ColumnHeaders.Clear
.ColumnHeaders.Add 1, , "ÎïÁÏÃû³Æ ", 50, 0
.ColumnHeaders.Add 2, , "ÎïÁÏÅú´Î ", 80, 0
.ColumnHeaders.Add 3, , "ÎïÁÏÊýÁ¿ ", 60, 0
.ColumnHeaders.Add 4, , "ÎïÁÏ¿âλ ", 80, 0
.ColumnHeaders.Add 5, , "ʹÓÃÇé¿ö ", 50, 0
.View = lvwReport
.Gridlines = True
ListView1.ListItems.Clear
'ListView1.ColumnHeaders.Clear
Dim strtb1 As String
strtb1 = TextBox1.Text
With Worksheets("sheet1")
For i = 3 To .[a65536].End(xlUp).Row
If .Cells(i, 1).Value Like "*" & strtb1 & "*" Then
Set Itm = ListView1.ListItems.Add()
Itm.Text = .Cells(i, 1)
' For c = 1 To 4
' Itm.SubItems(c) = .Cells(i, c + 1)
' Itm.SubItems(c) = Cells(i, c + 1)
' Next
Itm.SubItems(1) = .Cells(i, 2)
Itm.SubItems(2) = .Cells(i, 3)
Itm.SubItems(3) = Format(.Cells(i, 4), "@")
Itm.SubItems(4) = .Cells(i, 5)
End If
Next
End With
End With
Set Itm = Nothing
End Sub