PDA

View Full Version : Autofilter contain ctriteria



rabarber
10-29-2008, 05:00 AM
Hello. Can anybody tell me, how can i textbox value put in the autofilter contain criteria.

Selection.AutoFilter Field:=1, Criteria1:="=*textbox1.valu(Do not work :( )*", Operator:=xlAnd
ActiveWindow.SmallScroll Down:=-12

i basicly want to make form with textbox where i input only part of word what i want to find, so i need contain criteria.

thank you :)

Bob Phillips
10-29-2008, 05:15 AM
Selection.AutoFilter Field:=1, Criteria1:="=" & textbox1.text, Operator:=xlAnd
ActiveWindow.SmallScroll Down:=-12

rabarber
10-29-2008, 05:32 AM
xld, that do not fit for me, because it is equals criteria, i need "Contain" criteria so i can write in textbox only some part of word that i need to be filtered.
Criteria1:="=**" & textbox1.text (again do not know right syntax :/)

thanks for helping

Bob Phillips
10-29-2008, 05:40 AM
Selection.AutoFilter Field:=1, Criteria1:="=*" & TextBox1.Text & "*", Operator:=xlAnd

rabarber
10-29-2008, 05:49 AM
thanks alot, works fine :)