PRJ4: Pivot Table Code Doesn't Work on All Consolidated Projects

Q118690


The information in this article applies to:


SYMPTOMS

If you run the CreatePivotTable macro when a consolidated project is active, and if the files in the consolidated project are attached to their source files, you will receive the following error message:

An error has occurred during macro execution.

This macro will close now. Please try again.


CAUSE

The CreatePivotTable macro that is shipped with Microsoft Project does not work with consolidated projects that are attached to their source projects.


WORKAROUND

To create a pivot table from a consolidated project, you must clear the Attach To Source Projects check box BEFORE you consolidate your projects.

Once you do this, the macro will run properly.

NOTE: If for some reason the pivot table fails to run on the newly consolidated project, copy the information from the consolidated project to a new project.


MORE INFORMATION

To consolidate projects that are not attached to their source projects, do the following:

  1. From the Tools menu, choose Multiple Projects, and then choose Consolidate Projects.


  2. Type the name and location of the projects you want to consolidate or choose the Browse button to locate them.


  3. Clear the Attach To Source Projects check box at the bottom-left of the Consolidate Projects dialog box.


  4. Choose the OK button.


NOTE: As is defined in the SAMPLES.WRI file, the above error will also be generated if you do not have at least five worksheets in a new Microsoft Excel workbook. To check whether you have enough worksheets for a new workbook in Microsoft Excel:

  1. From the Tools menu, choose Options.


  2. Select the General tab, and make sure the Sheets In New Workbook option is set to 5 or greater, and choose the OK button.


  3. In Microsoft Project, rerun the CreatePivotTables macro.


Additional query words: 5.00a

Keywords : kbinterop
Issue type : kbbug
Technology :


Last Reviewed: November 3, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.