R
Rachael
hello there! I have a column of data which i want to filter using
combo box. However,numbers do not occur in the combo box list when i
need to select which item to filter. Do i define the variable as
something else or something is wrong with the code? I need the combo
box to read in both text and numbers. Thanks!
Here's the code:
Private Sub filterp_Click()
Dim Class As Variant
Class = ComboBox1.Value
Sheets("Sheet1").Range("A2:AE65000").Select
Selection.AutoFilter Field:=1, Criteria1:=Class
End Sub
combo box. However,numbers do not occur in the combo box list when i
need to select which item to filter. Do i define the variable as
something else or something is wrong with the code? I need the combo
box to read in both text and numbers. Thanks!
Here's the code:
Private Sub filterp_Click()
Dim Class As Variant
Class = ComboBox1.Value
Sheets("Sheet1").Range("A2:AE65000").Select
Selection.AutoFilter Field:=1, Criteria1:=Class
End Sub