LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table Selection Sandeep Jangra[_2_] Excel Discussion (Misc queries) 2 October 10th 08 05:32 PM
Automate pivot table selection Steve Excel Discussion (Misc queries) 0 July 17th 08 11:34 AM
pivot table selection bayanbaru Excel Worksheet Functions 0 June 28th 05 01:21 AM
Pivot Table - Multiple Pivot Field Selection Paul Mac.[_2_] Excel Programming 3 November 10th 03 01:13 PM
Pivot table selection John Thomas Excel Programming 0 July 31st 03 12:06 AM


All times are GMT +1. The time now is 03:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"