JAF, if you don't discover a PivotTable change
event you might consider the following. Let's
assume that Sheet1!A1:B2 contains
{"Month","Sales";"Jan",100;"Feb",200}. Now
suppose that cell Sheet1!C1 contains "Sel" for
selector, and the formula, =A2=Sheet2!$A$2, has
been entered into cell C2 and copied down.
Your PivotTables reside on Sheet2 where Sheet2!A1:A2
contains {"Month";"Jan"}. The Page fields of these
PivotTables have been configured to "Sel" and the
2nd PivotTable was sourced from the 1st (i.e.,
"Another PivotTable" was chosen at Step 1 of 4 of
the PivotTable Wizard and PivotTable1 was chosen at
Step 2 of 4). Now all you'd have to do is change
the value in Sheet2!A2 and refresh PivotTable1.
PivotTable2 will conform.
...The Page fields of these PivotTables have been configured with
"Sel" set to TRUE...
You might be able to code an event that watches
cell Sheet2!A2 for changes and automatically
refreshes PivotTable1 for you.
Hi JAF
This should work.
Dim pt As PivotTable
Dim MyDate As String
Dim sht As Worksheet
Private Sub Worksheet_Calculate()
Application.EnableEvents = False
Set pt = Me.PivotTables(1)
MyDate = pt.PageFields(1).CurrentPage
For Each sht In ThisWorkbook.Worksheets
On Error Resume Next
Set pt = sht.PivotTables(1)
pt.PageFields(1).CurrentPage = MyDate
Next sht
Application.EnableEvents = True
End Sub
Hope it helps
Dave
OzGrid Business Applications