Creates a new PivotCache.
The following two XlPivotTableSourceType constants are not supported when creating a PivotCache by using this method: xlPivotTable and xlScenario. A run-time error is returned if one of these two constants is supplied. The SourceData argument is required if SourceType isn't xlExternal. It should be passed a Range object (when SourceType is either xlConsolidation or xlDatabase) or a WorkbookConnection object (when SourceType is xlExternal). When passing a Range object, we recommend that you either use a string to specify the workbook, worksheet, and cell range, or set up a named range and pass the name as a string. Passing a Range object may cause "type mismatch" errors unexpectedly. When not supplied, the version of the PivotTable will be xlPivotTableVersion12. The use of the xlPivotTableVersionCurrent constant is not allowed and returns a run-time error if it is supplied.
Dim pvtcacCreate As PivotCache Set pvtcacCreate = ActiveWorkbook.PivotCaches.Create(SourceType:=xlConsolidation)
The following argument is required
Possible Values are
|xlConsolidation||Multiple consolidation ranges.|
|xlDatabase||Microsoft Excel list or database.|
|xlExternal||Data from another application.|
|xlPivotTable||Same source as another PivotTable report.|
|xlScenario||Data is based on scenarios created using the Scenario Manager.|
The following arguments are optional