Hi there,
As a newby I managed to change the layout of my Pivot using VBA but I can't seem to find what code to use to change the interior color and font layout of the column / row headers. I guess it's fairly simple but can't find it
This is the code I use for the current layout as in the picture below:
PvtTbl.PivotSelect "Row Grand Total", xlDataAndLabel, True
Selection.Interior.Color = RGB(159, 192, 234)
PvtTbl.PivotSelect "Day[All;Total]", xlDataAndLabel, True
With Selection
.Interior.Color = RGB(200, 240, 250)
.Font.Italic = True
End With
PvtTbl.PivotSelect "Column Grand Total", xlDataAndLabel, True
Selection.Interior.Color = RGB(228, 223, 236)
Selection.Font.Color = RGB(0, 0, 0)
Selection.Font.Bold = True
PvtTbl.PivotSelect "Hour[All]", xlLabelOnly, True
Selection.Interior.Color = RGB(208, 192, 234)
{bad HTML removed by mod}
Any ideas?
As a newby I managed to change the layout of my Pivot using VBA but I can't seem to find what code to use to change the interior color and font layout of the column / row headers. I guess it's fairly simple but can't find it

This is the code I use for the current layout as in the picture below:
PvtTbl.PivotSelect "Row Grand Total", xlDataAndLabel, True
Selection.Interior.Color = RGB(159, 192, 234)
PvtTbl.PivotSelect "Day[All;Total]", xlDataAndLabel, True
With Selection
.Interior.Color = RGB(200, 240, 250)
.Font.Italic = True
End With
PvtTbl.PivotSelect "Column Grand Total", xlDataAndLabel, True
Selection.Interior.Color = RGB(228, 223, 236)
Selection.Font.Color = RGB(0, 0, 0)
Selection.Font.Bold = True
PvtTbl.PivotSelect "Hour[All]", xlLabelOnly, True
Selection.Interior.Color = RGB(208, 192, 234)
{bad HTML removed by mod}
Any ideas?
Last edited by a moderator: