![]() |
Getpivottable function
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 |
Getpivottable function
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 |
All times are GMT +1. The time now is 10:07 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com