I have a table with a column that has dates I am filtering through. I am trying to take the criteria value and assign it to a variable but keep running into an error. (Run-time error '1004': Application-defined or object-defined error). Can anyone help?
filter code:
ActiveSheet.ListObjects("MyTbl").Range.AutoFilter Field:=5, _
Operator:=xlFilterValues, Criteria2:=Array(0, "10/1/2017")
My Code:
Dim x As Variant
If Table.AutoFilter.Filters(5).On Then
x = Table.AutoFilter.Filters(5).Criteria2
End If

