Update pivot table report filter using cell value

D

David

Please point a VBA beginner in the right direction:

I want the code below to update the pivot table based on the cell value in
"C5" of a worksheet named "Dates".

Can this be done by amending the last line of recorded code below?

Windows("VDN Daily.xlsm").Activate

ActiveSheet.PivotTables("PivotTable1").PivotFields( _
"[Record Date].[Date].[Date]").ClearAllFilters

ActiveSheet.PivotTables("PivotTable1").PivotFields( _
"[Record Date].[Date].[Date]").CurrentPageName = _
"[Record Date].[Date].&[2010-02-27T00:00:00]"

Thanks for any help.

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top