A
Adam
A colleague has deleted the underlying data for a Pivot
Table. I was hoping to retrieve the original data from the
PivotCache using code like this:
Dim MyPC As PivotCache
Set MyPC = ActiveWorkbook.PivotCaches(1)
'Write the recordset
Range("A10").Offset(1, 0).CopyFromRecordset
MyPC.Recordset
When run, this code generates an "Application-defined or
Object-defined error". Is it possible to read the
PivotCache underlying a Pivot Table?
Table. I was hoping to retrieve the original data from the
PivotCache using code like this:
Dim MyPC As PivotCache
Set MyPC = ActiveWorkbook.PivotCaches(1)
'Write the recordset
Range("A10").Offset(1, 0).CopyFromRecordset
MyPC.Recordset
When run, this code generates an "Application-defined or
Object-defined error". Is it possible to read the
PivotCache underlying a Pivot Table?