Hi,
this may sound easy but i'm new to vba so i don't know the exact syntax to use...
I want to loop throught all Textbox in a userform and wanna perfom a specific command if they are empty or not...
the boxes are all named TextBox1, TextBox2, ... so I wanna have acces to the value in it and apply a filter with those values
so basically i wanna write the criteria of my filter in a textbox and applythem:
lets say there is 55045 in TextBox1 and 1234 in TextBox2 and all they others are empty
dim i as integer
for i = 1 to 20
TextBox1=TextBox1.value
if textbox1,2,3,... <> "" then
ActiveSheet.Range("$A$1:$W$500").AutoFilter Field:=3, Criteria1:=Array("55045", "1234"), Operator:=xlFilterValues
I also try to put the value in an array but it didn't work out well cause i needed the quotes to apply the filter after...
Thanks for your help!
this may sound easy but i'm new to vba so i don't know the exact syntax to use...
I want to loop throught all Textbox in a userform and wanna perfom a specific command if they are empty or not...
the boxes are all named TextBox1, TextBox2, ... so I wanna have acces to the value in it and apply a filter with those values
so basically i wanna write the criteria of my filter in a textbox and applythem:
lets say there is 55045 in TextBox1 and 1234 in TextBox2 and all they others are empty
dim i as integer
for i = 1 to 20
TextBox1=TextBox1.value
if textbox1,2,3,... <> "" then
ActiveSheet.Range("$A$1:$W$500").AutoFilter Field:=3, Criteria1:=Array("55045", "1234"), Operator:=xlFilterValues
I also try to put the value in an array but it didn't work out well cause i needed the quotes to apply the filter after...
Thanks for your help!