Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set selection of Pivot Table using VBA
Hi all,
I have to manipulate the selection of fields in a Pivot Table using VBA. Description: One Worksheet hosts a Pivot Table which hosts a lot of Data. Another Worksheet, which is used for an Executive Summary only displays one line of the original table. To allow the user switching between different Quarters in this executive summary I have to change the selected data in the original Pivot Table. I created a drop down field where Quarters (Q1, Q2, Q3, Q4) can be selected and would like that a change here would affect the original Pivot Table (change the Page Field Data). Therefore I programmed a small macro which doesn't work in the way I expect it. After all it does nothing. Can anybody help me as I am a bloody starter in programming VBA? Public Sub ChangePage() Sheets("OverallView").Select Set ActiveSheet.PivotTables("PivotTable3").PivotFields ("Quarter").CurrentPage = Range("ExecutiveS!G5").Value Sheets("ExecutiveS").Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot Table Selection | Excel Discussion (Misc queries) | |||
Automate pivot table selection | Excel Discussion (Misc queries) | |||
pivot table selection | Excel Worksheet Functions | |||
Pivot Table - Multiple Pivot Field Selection | Excel Programming | |||
Pivot table selection | Excel Programming |