LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #24   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Pivot Table - change page field help

On Mar 16, 12:02*pm, "Roger Govier"
<roger@technology4unospamdotcodotuk wrote:
Hi

you could have something cascading from sheet to sheet like the following

On Sheet1
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column 1 Then Exit Sub
If Target.Value = "go" Then
Sheets("Sheet2").Range("a1") = "go"
Sheets("Sheet3").Range("A1") = "go"
End If
End Sub

Sheet2
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Range("a1") = "go" Then
MsgBox ("I'm doing something on Sheet2")
End If
Application.EnableEvents = True
End Sub

Sheet3
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = True
If Range("a1") = "go" Then
MsgBox ("I'm doing something on Sheet3")
End If
Application.EnableEvents = True
End Sub

Try setting up a new work book and entering the code above onto the the
sheet module of sheets 1 2 and 3, then type Go in cell A1 of Sheet1 and you
will get the idea.

If you substitute what you want to do on each sheet with the required code
for updating your PT, rather than Msgbox, then you should be bale to sort
out what you want.

Clearly what you write to each sheet or what location you use in each sheet
is up to you.

--
Regards
Roger Govier

"Opal" wrote in message

...



Thank you Roger, I appreciate the offer, but I cannot as the
data is proprietory.


Can this be done outside of a module with the code
attached to each sheet and even though each sheet is not
the active sheet, a cell in the sheet will change value based
on a change in the active sheet?- Hide quoted text -


- Show quoted text -


Hi Roger, I understand what you have put together
and can see what will happen without having to create
a workbook. I'm still new to coding, but can understand the
logic flow of written code. Actually, its not really a
cascading change, because cell A1 in each sheet will
have a different value -- all 6 sheets cells A1 all change
values at the same time, but the values differ and is from these
new values that I want the pivot tables to update. The new value
is a part number which is generated on another sheet based on
the amount of downtime noted on the particular part in the last
5 production runs. The 6 worst part numbers are generated from
a pivot on another chart. These part numbers are then noted in
a range and linked to each of the 6 pivot table sheets. I have been
using, in a module, the following:

PartNo = Sheets("FSChart1").Range("A1").Value
Sheets("FSChart1").PivotTables("PT1").PivotFields
("PARTNO").CurrentPage = PartNo

but its slow, and I thought if the sub was on the sheet itself, it
would speed up the process, hence why I started this thread in
the hopes of modifying Debra's code to suit my situation.

If it cannot be done, I will continue to muddle through as I have
been.

 
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
Page field - pivot table yshridhar Excel Discussion (Misc queries) 0 August 1st 07 04:48 AM
Pivot Table Page Field Barb Reinhardt Excel Programming 0 July 7th 07 02:36 AM
Change Page Field in a Pivot Table and Print Chart + Data Philip J Smith Excel Programming 2 February 19th 07 04:13 PM
Pivot Table Page Field Neily Excel Discussion (Misc queries) 3 February 24th 05 01:23 PM
Pivot Table Page Field Todd Huttenstine Excel Programming 2 May 6th 04 04:24 PM


All times are GMT +1. The time now is 12:21 PM.

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

About Us

"It's about Microsoft Excel"