Hello All,
I am currently trying to filter a querytable in Excel 2007 by using an activex combobox that is not on a userform.
Below is a copy of my code that is not working. I get an error that telling me I need an object, but when I create an object it still doesn't work.
The syntax is what my issue is.
Your assistance is greatly appreciated.
I am currently trying to filter a querytable in Excel 2007 by using an activex combobox that is not on a userform.
Below is a copy of my code that is not working. I get an error that telling me I need an object, but when I create an object it still doesn't work.
Code:
Private Sub ComboBox1_Change()
Dim Sheet As Object
With Data
Sheet.Range("Table_AP2_Accuracy.accdb").AutoFilter Field:=2 _
, Criteria1:=ComboBox1.Value
End With
End Sub
The syntax is what my issue is.
Your assistance is greatly appreciated.