Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 468
Default Change Pivot Table PageArea Selection

My Current Pivot table (Named Pivottable1) on my sheet named MyPT has a Page
Area with Values (ALL, 1,2,3,4,5). I need to Change it from another sheet
named Report!Range("b4").value - that would only contain the values, 1 to 5.

When I enter into Cell B4, say 5 -- I need for my Pivottable1 (on MyPT
sheet) to filter the PageArea selection to 5, and REFRESH the PT.

How can I do this?

Thanks in Advance for any assistance...

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Change Pivot Table PageArea Selection

Take a look at this:
http://www.contextures.com/xlPivot04.html

Look here too:
http://www.contextures.com/xlPivot01.html

Notice the dozen or so examples at the bottom of the page; that may help you
too.


Regards,
Ryan---
--
RyGuy


"JMay" wrote:

My Current Pivot table (Named Pivottable1) on my sheet named MyPT has a Page
Area with Values (ALL, 1,2,3,4,5). I need to Change it from another sheet
named Report!Range("b4").value - that would only contain the values, 1 to 5.

When I enter into Cell B4, say 5 -- I need for my Pivottable1 (on MyPT
sheet) to filter the PageArea selection to 5, and REFRESH the PT.

How can I do this?

Thanks in Advance for any assistance...

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 468
Default Change Pivot Table PageArea Selection

Found this in a VBA book -- I had to modify some... Do you see a problem?
It seems to be working OK, but that only means for now LOL,,,
Thanks,
Jim

Sub UpDatePageArea()
Dim ws As Worksheet
Dim PT As PivotTable
Application.ScreenUpdating = False
Sheets("ViewOnlyReport").Activate
Set ws = Worksheets("ViewOnlyReport")
Set PT = ActiveSheet.PivotTables("Pivottable1")
PT.PivotFields("GroupNo").CurrentPage =
Sheets("GroupReports").Range("B4").Value
PT.PivotCache.Refresh
CopyPTtoGroupReports
Sheets("GroupReports").Activate
Application.ScreenUpdating = True

End Sub

"ryguy7272" wrote:

Take a look at this:
http://www.contextures.com/xlPivot04.html

Look here too:
http://www.contextures.com/xlPivot01.html

Notice the dozen or so examples at the bottom of the page; that may help you
too.


Regards,
Ryan---
--
RyGuy


"JMay" wrote:

My Current Pivot table (Named Pivottable1) on my sheet named MyPT has a Page
Area with Values (ALL, 1,2,3,4,5). I need to Change it from another sheet
named Report!Range("b4").value - that would only contain the values, 1 to 5.

When I enter into Cell B4, say 5 -- I need for my Pivottable1 (on MyPT
sheet) to filter the PageArea selection to 5, and REFRESH the PT.

How can I do this?

Thanks in Advance for any assistance...

Reply
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
Set selection of Pivot Table using VBA [email protected] Excel Programming 6 March 12th 07 09:53 AM
Pivot table change selection Bernie Deitrick Excel Programming 0 December 13th 06 04:50 PM
Pivot table change selection Bernie Deitrick Excel Programming 0 December 13th 06 04:50 PM
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 05:03 AM.

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"