PivotTables Object
A collection of all the PivotTable objects on the specified worksheet.
Remarks
Because PivotTable report programming can be complex, it's generally easiest to record PivotTable report actions and then revise the recorded code.
Example
Use the PivotTables method to return the PivotTables collection. The following example displays the number of PivotTable reports on Sheet3.
| Visual Basic for Applications |
|---|
|
Use the PivotTableWizard method to create a new PivotTable report and add it to the collection. The following example creates a new PivotTable report from a Microsoft Excel database (contained in the range A1:C100).
| Visual Basic for Applications |
|---|
|
Use PivotTables(), where is the PivotTable index number or name, to return a single PivotTableobject. The following example makes the Year field a row field in the first PivotTable report on Sheet3.
| Visual Basic for Applications |
|---|
|
See also:
- Excel Object Model Reference
- PivotTables Object Members
- PivotCache Object
- PivotCell Object
- PivotField Object
- PivotFormula Object
- PivotItem Object
- PivotItemList Object
- PivotLayout Object
- PivotTable Object
| index | index |