M
Marc
Hi,
I have a problem with my code. I have made a userform with a textbox
and am trying to filter a set of numbers in a column.
I can get it to work when I write the exact number in the textbox
which
is also in the list with numbers. But I want to use the "*" asterisk.
Lets say if 123123 is in list and the textbox-value is 1. Then the
number should not be filtered/hidden.
Private Sub TextBoxWorkCenter_Change()
Dim Criteria1 As Double 'Tried As
String
Criteria1 = Val(TextBoxWorkCenter.Value) 'Tried using: & "*"
and without Val()
Worksheets("test1").Range("B6:B1000").AutoFilter _
field:=1, _
Criteria1:=Criteria1 & "*", _
Operator:=xlOr, _
Criteria2:="Center*", _
VisibleDropDown:=False
End Sub
Hope that somebody can help me????
Cheers
Marc
I have a problem with my code. I have made a userform with a textbox
and am trying to filter a set of numbers in a column.
I can get it to work when I write the exact number in the textbox
which
is also in the list with numbers. But I want to use the "*" asterisk.
Lets say if 123123 is in list and the textbox-value is 1. Then the
number should not be filtered/hidden.
Private Sub TextBoxWorkCenter_Change()
Dim Criteria1 As Double 'Tried As
String
Criteria1 = Val(TextBoxWorkCenter.Value) 'Tried using: & "*"
and without Val()
Worksheets("test1").Range("B6:B1000").AutoFilter _
field:=1, _
Criteria1:=Criteria1 & "*", _
Operator:=xlOr, _
Criteria2:="Center*", _
VisibleDropDown:=False
End Sub
Hope that somebody can help me????
Cheers
Marc