GetPivotData is a method of the PivotTable, and there's an example in
Excel VBA help:
'================
Sub UseGetPivotData()
Dim rngTableItem As Range
' Get PivotData for the quantity of chairs in the warehouse.
Set rngTableItem = ActiveCell. _
PivotTable.GetPivotData("Quantity", "Warehouse", "Chairs")
MsgBox "The quantity of chairs in the warehouse is: " _
& rngTableItem.Value
End Sub
'=====================
Raypat wrote:
I am trying to use the getpivotable function within VBA but am unable to do
so..
Tried to use the following
application.worksheet.getpivottable
I get an error. I am able to use getpivottabledata within a worksheet as a
formula no problem..
Basically I am attempting to obtain summary information from a pivot table
and automating it within a Macro..
Regards,
Ray Pathak
--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html