Setting Pivot Table Page Field Names using VBA
And what happens?
Does the variable region hold a legitimate item value from the PivotField
"Region"?
I have found looping throught the items to find a match and setting the
current page to the matched item works when this construct doesn't.
--
Regards,
Tom Ogilvy
"Ron McCormick" wrote in message
...
I'm trying to set Pivot table field names with the
following code.
For Each Region In Regions
.
.
ActiveSheet.PivotTables
("PivotTable_2").PivotSelect "", xlDataAndLabel
ActiveSheet.PivotTables("PivotTable_2").PivotField s
("Region").CurrentPage = _
Region
|