R
Rammy
Using Excel 2007. I have two (or more) pivot tables that I want to be able to
link the selections made in one to another. I have the following code
Sub test()
Sheets("Sheet1").Select
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim SPgField1 As String
Range("b1").Select
SPgField1 = Selection
Sheets("Sheet1").PivotTables("PivotTable2").PivotFields("Field
1").CurrentPage = SPgField1
End Sub
The pivots are on sheet1
The 1st pivot table has 1 selection Field1.
The above code works if i am only making a single selection
However I need to be able to do multiple selections.
When this is done in the field b1 it shows the value Multiple Selections
This gets copied into the field1 on pivot table 2 - and overwrites the first
value of the selection list with Multiple Values. But doesnt do the correct
values
Any ideas much appreciated
link the selections made in one to another. I have the following code
Sub test()
Sheets("Sheet1").Select
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim SPgField1 As String
Range("b1").Select
SPgField1 = Selection
Sheets("Sheet1").PivotTables("PivotTable2").PivotFields("Field
1").CurrentPage = SPgField1
End Sub
The pivots are on sheet1
The 1st pivot table has 1 selection Field1.
The above code works if i am only making a single selection
However I need to be able to do multiple selections.
When this is done in the field b1 it shows the value Multiple Selections
This gets copied into the field1 on pivot table 2 - and overwrites the first
value of the selection list with Multiple Values. But doesnt do the correct
values
Any ideas much appreciated