Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to use one pivot table filter to activate both pivot tables on one
sheet in Excel 2007. Code doesn't seem to be working. Any help would be greatly appreciated. Private Sub Worksheet_Calculated() Dim MvPivotPageValue As Variant Dim Pt As PivotTable 'main pivot table Dim Pt1 As PivotTable ' 2nd pivot table Dim WsOther As Worksheet ' name of worksheet Dim strField As String ' report filter name Set WsOther = Sheets("Division Summary1") Set Pt = PVT1 Set Pt1 = WS.Other.PVT2 Set strField = "Fiscal Calendar" If LCase(Pt.PivotFields("Fiscal Calendar").CurrentPage) < LCase(MvPivotPageValue) Then Application.EnableEvents = False Pt.RefreshTable MvPivotPageValue = Pt.PivotFields(strField).CurrentPage Pt1.PageFields(strField).CurrentPage = MvPivotValue Application.EnableEvents = True End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Newbie floundering in the VBA code | Excel Programming | |||
Newbie needs assistance with VBA code | Excel Programming | |||
If-Then in ComboBox_Change..... (VB Code Newbie) | Excel Programming | |||
Newbie : How to sum cells via VBA code. | Excel Programming |