VBA to set Pivot Table formats

D

David

I intend to re-set formats using the worksheet open event
My question is about referencing cells within the pivot table with the VBA
code
For example, if I want to work on the format of the table column headers
will there be a reference like: MyPivotTable.rows(1) that I can use?
Thanks - any advice will be appreciated
 
P

Patrick Molloy

not with 2003

try this though ....

Dim pt As PivotTable
Dim topRow As Range
Set pt = ActiveSheet.PivotTables(1)
Set topRow = pt.TableRange1.Rows(1)
topRow.Select
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top