PivotCache.SourceType (Excel)
Returns an XlPivotTableSourceType value that represents the type of item being published. Possible return 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.
Dim xptSourceType As XlPivotTableSourceType
xptSourceType = ActiveWorkbook.PivotCaches(1).SourceType