Private
Sub
TextBox1_Change()
Dim
i
As
Integer
Dim
lngLaenge
As
Long
Dim
strTex
As
String
Me
.ListBox2.Clear
UserForm_Initialize
lngLaenge = Len(
Me
.TextBox1.Value)
If
Left(
Me
.TextBox1.Value, 1) =
"*"
Then
strText = LCase(Replace(
Me
.TextBox1.Value,
"*"
,
""
))
For
i =
Me
.ListBox2.ListCount - 1
To
0
Step
-1
If
InStr(LCase(
Me
.ListBox2.List(i, 2)), strText) > 0
Then
Else
Me
.ListBox2.RemoveItem i
End
If
Next
i
Else
For
i =
Me
.ListBox2.ListCount - 1
To
0
Step
-1
If
LCase(Left(
Me
.ListBox2.List(i, 0), lngLaenge)) = LCase(
Me
.TextBox1.Value)
Then
Else
Me
.ListBox2.RemoveItem i
End
If
Next
i
End
If
End
Sub