Hi, All
I'm tried to filter excel table by date variables through data picker. table filter with no entries by the program. buy actually table has values within the selected range. My code as below, pls help.
++++++++++++++++++++++++++++++
Sub Filter_table()
Dim from_date As Date
Dim to_date As Date
'Dim my_range As Range
Dim Table1 As ListObject
from_date = DTPicker1
to_date = DTPicker2
Set Table1 = Sheet2.ListObjects(1)
Set my_range = Selection
Table1.Range.AutoFilter 5, ">=" & from_date, xlAnd, "<=" & to_date
End Sub
Bookmarks