ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PageFields in 'Rows to repeat at top' (https://www.excelbanter.com/excel-programming/303728-pagefields-rows-repeat-top.html)

[email protected]

PageFields in 'Rows to repeat at top'
 
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


John Camburn

PageFields in 'Rows to repeat at top'
 
For Each objPageField In PivotTable.PageFields
MsgBox objPageField.DataRange.Address
Next

wrote in message
...
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




William[_2_]

PageFields in 'Rows to repeat at top'
 
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



wrote in message
...
| 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
|




All times are GMT +1. The time now is 12:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com