I have a work book linked to an external data source, and would like to sort the data using dynamic date ranges from a drop down list in a cell.

I've tried everything I can think of to make the code work.

Currently I have a drop-down list in cell C13 and a vlookup formula that returns xlFilterYesterday

Here is the code that doesn't work

PHP Code: 
ActiveSheet.ListObjects("Table_SalesLineItems11").Range_
        AutoFilter Field
:=1Criteria1:=Range("C12"), Operator:=xlFilterDynamic 
Here is the original code I have where I have several button on the worksheet making things complicated.

PHP Code: 
ActiveSheet.ListObjects("Table_SalesLineItems11").Range_
        AutoFilter Field
:=1Criteria1:=xlFilterYesterdayOperator:=xlFilterDynamic 
I also hoping this will cut down the amount of code I have in the Module significantly.

Any help would be greatly appreciated.

Thanks,

Rusty