Excel VBA Pivot Table Fill Header
<p>In excel vba I am creating a pivot table and want to fill the header (first two rows) and bottom line (1 row) blue with white font. </p>

<p>The below code fills in the interior of the first data set row rather than the header.</p>

<pre><code>With ActiveSheet.PivotTables(1).TableRange1
 .Cells.Borders.LineStyle = xlContinuous
 .Range("A3:I4").Interior.ColorIndex = 49
 .Range("A13:I13").Interior.ColorIndex = 49
End With
</code></pre>

<p>Is there a way to dynamically reference the header and the last line of the pivot table? It would be better to reference "pivot table header" than specific ranges incase values of the report change.</p>