lprabhu1107
Board Regular
- Joined
- Mar 10, 2011
- Messages
- 106
Dear Experts,
I have created a macro to refersh pivot table and change date in the pagefild. The macro is as follows,
Sub Macro1()
ActiveSheet.PivotTables("PivotTable2").PivotCache.Refresh
ActiveSheet.PivotTables("PivotTable2").PivotFields("Snapshot").CurrentPage = Format(Date, "dd-mmm")
End Sub
With the above macro pivot table gets refreshed. however the date in the pagefield doesnt change to todays date.Ecxel returns a 1004 error.
Can you guys pls give some ideas to the above problem
Regards
Prabhu
I have created a macro to refersh pivot table and change date in the pagefild. The macro is as follows,
Sub Macro1()
ActiveSheet.PivotTables("PivotTable2").PivotCache.Refresh
ActiveSheet.PivotTables("PivotTable2").PivotFields("Snapshot").CurrentPage = Format(Date, "dd-mmm")
End Sub
With the above macro pivot table gets refreshed. however the date in the pagefield doesnt change to todays date.Ecxel returns a 1004 error.
Can you guys pls give some ideas to the above problem
Regards
Prabhu