Sub
Name()
searchstring = TextBox1.Value
Dim
resultarray(1
To
500)
As
String
t = 1
For
i = 2
To
500
If
InStr(1, Sheets(
"Tabelle1"
).Cells(i, 8), searchstring, vbTextCompare) <> 0
Then
resultarray(t) = Sheets(
"Tabelle1"
).Cells(i, 8)
t = t + 1
End
If
Next
i
With
UserForm1.ListView1
.FullRowSelect =
True
.View = lvwReport
.Sorted =
True
.SortOrder = lvwAscending
.LabelEdit = lvwManual
.ColumnHeaders.Add , ,
"Name"
, 400
End
With
i = 1
While
Not
resultarray(i) =
""
Set
lvRes = UserForm1.ListView1.ListItems.Add(, , resultarray(i))
i = i + 1
Wend
UserForm1.Show
False
End
Sub