Excel Pivot Table VBA Notes

 

Links: http://peltiertech.com/WordPress/referencing-pivot-table-ranges-in-vba/

"PivotTable" object in VBA help.

 

---

Sub PivotTest()

 

Dim pt As PivotTable

Set pt = ActiveSheet.PivotTables(1)

'pt.TableRange1.Select ' this selects the entire table, row and column headers included

pt.DataBodyRange.Select ' this selects the data rows in the pivot table - no columns or headers.

Debug.Print pt.DataBodyRange.Address

 

 

 

End Sub

 
 
tags: pivot, table, pivottable
Related Scribbles:
  • VBA Excel Notes
  • Excel Notes


  • ID: 961
    Author:
    leonard
    Date Updated:
    2010-12-28 18:01:47
    Date Created:
    2010-12-28 18:01:47

    Edit

    Comments?
     >> Leonard Chan's Homepage  >> Scribble Web  >> Excel Pivot Table VBA Notes
    leonard.lotus-land.ca is hosted by Perceptus Solutions Inc.