View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
rivkarak rivkarak is offline
external usenet poster
 
Posts: 1
Default Copying sheet containing GetPivotData, new sheet references old workbook!

I have a workbook with several sheets each containing a pivot table in
Excel 2003.
The last sheet in the book compiles data from the other sheets using
the GetPivotData function.
I want to copy all the sheets to a new workbook and preserve the
relative referencing.
That is,
the GetPivotData functions on the last page of the NEW workbook should
reference the pivot tables in the NEW workbook and not the ones in the
original workbook.

I copy the sheets to a new workbook all together using:
ThisWorkbook.Sheets.Copy

Still, Excel inserts a reference to the original workbook in the
getPivotData function in the new workbook (using the fullfilepath) .

Any ideas?