XL5: Macro Errors Changing Data Source to "Another PivotTable"

Last reviewed: September 12, 1996
Article ID: Q124933
The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0

SYMPTOMS

In Microsoft Excel version 5.0, the following error may occur when you attempt to change the data source for a pivot table to "Another PivotTable" in a Visual Basic, Applications Edition, macro:

   Run-time error '1004':

   PivotTableWizard method of Worksheet Class Failed.

If you are using the Excel 4.0 Macro language, a macro error will occur in the cell that contains the PIVOT.TABLE.WIZARD function.

CAUSE

This problem occurs if the pivot tables are in a different worksheet within the same workbook. This problem does not occur if both pivot tables are on the same worksheet.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Excel for Windows version 5.0c.

MORE INFORMATION

When you create a pivot table from data in another pivot table, both pivot tables are then linked to the same underlying source data. If you refresh one of the pivot tables, the other pivot table will automatically be refreshed.

Changing the SourceData argument of the PivotTableWizard method to a pivot table in another worksheet results in the problem described above.


KBCategory: kbtool kberrmsg
KBSubcategory:

Additional reference words: 5.00



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 12, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.