PageFields in 'Rows to repeat at top'

F

Frank

How can I identify the addresses of PageFields so that I can set them
to print in the 'Rows to repeat at top' and the 'Columns to Repeat at
Left' in the Print setup?

My spreadsnheet has more than one Pivot Table with the Pvot Tbles
having different numbers of PageFields.

Thanks
 
J

John Camburn

For Each objPageField In PivotTable.PageFields
MsgBox objPageField.DataRange.Address
Next
 
W

William

Hi Frank

To set the row headers for a particular pivot table, try...
MsgBox ActiveSheet.PivotTables(1). _
PageRangeCells.EntireRow.Address

To set the column headers for a particular pivot table, try...
MsgBox ActiveSheet.PivotTables(1). _
RowRange.EntireColumn.Address


--
XL2002
Regards

William

[email protected]

| How can I identify the addresses of PageFields so that I can set them
| to print in the 'Rows to repeat at top' and the 'Columns to Repeat at
| Left' in the Print setup?
|
| My spreadsnheet has more than one Pivot Table with the Pvot Tbles
| having different numbers of PageFields.
|
| Thanks
|
 
Top