Format Page Field

  • Thread starter Thread starter TheVisionThing
  • Start date Start date
T

TheVisionThing

I'm looking for some code as follows to change the background color of every
page field in a pivot table

Dim pt as PivotTable,pf as PivotField
For Each ws In ThisWorkbook.Worksheets
For Each pf In pt.PageFields
' change the background color
Next
Next

Thanks,
Wayne C.
 
Maybe...


Dim pt As PivotTable
Dim pf As PivotField
Dim ws As Worksheet

For Each ws In ThisWorkbook.Worksheets
For Each pt In ws.PivotTables
For Each pf In pt.PageFields
pf.LabelRange.Interior.ColorIndex = 6
Next pf
Next pt
Next ws
 
Back
Top