ThrottleWorks
Excel Ninja
Hi,
I am trying to filter a Date value from a column with VBA.
I need to filter with criteria as 'Equal to or Before' date.
I tried below mentioned line but it is not working. Please note, TheDate is defined as Date in the code and it has a valid value.
Can anyone help me in this please.
I am trying to filter a Date value from a column with VBA.
I need to filter with criteria as 'Equal to or Before' date.
I tried below mentioned line but it is not working. Please note, TheDate is defined as Date in the code and it has a valid value.
Can anyone help me in this please.
Code:
Rng.AutoFilter Field:=DateCol, Criteria1:="<=" & TheDate, Operator:=xlAnd