Forum Discussion
Excel VBA to filter a table based on multiple search criteria entry in ActiveX Control Textbox
- May 08, 2023
That is unavoidable; the code has to do a lot of work. In that case, I'd use a command button to filter, instead of reacting to every keystroke.
When I copied the code to the actual file and right-sized it by changing the column number to 6 as the search items sit in column 6 it says there's a bug:
When I copied the code to the actual file and right-sized it by changing the column number to 6 as the search items sit in column 6 it says there's a bug:
To change the search column to column 6, change this part (in Private Sub TextBox1_GotFocus()):
va = .DataBodyRange.Columns(2).Value
to
va = .DataBodyRange.Columns(6).Value
Also, after applying the multi search, i could not apply filter to the table:
The filter actually isn't on the table but in the helper column.
Why do you need to apply filter to the table after applying the multi search?
it does not return the expected result
Is it on my sample workbook or on your actual workbook?
Can you give an example?