XL: Error with Password-Protected File Containing PivotTable

ID: Q136142


The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for the Macintosh, versions 5.0, 5.0a
  • Microsoft Excel for Windows NT, version 5.0
  • Microsoft Excel for Windows 95, versions 7.0, 7.0a


SYMPTOMS

In the versions of Microsoft Excel listed above, you may receive an error if you attempt to change a PivotTable and the following are true:

  • XLQUERY.XLA (Microsoft Query Add-in) is open.

    -and-


  • A workbook which is password-protected and contains a PivotTable is open.

    -and-


  • The PivotTable has the option "Save Data With Table Layout" selected.


If the all of the above are true:

  • In Microsoft Excel 5.0 for Windows and in Microsoft Excel 5.0 for Windows NT, you may receive an application error.


  • In Microsoft Excel 7.0 for Windows 95, you may receive an invalid page fault.


  • In Microsoft Excel 5.0 for the Macintosh, you may receive a system error.




RESOLUTION

To resolve this problem, obtain Microsoft Excel 97 for Windows or Microsoft Excel 98 Macintosh Edition.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:

http://www.microsoft.com/support/supportnet/overview/overview.asp

To work around this problem so that the error does not occur, you can create an auto-open macro for the workbook containing the PivotTable so that the PivotTable is automatically refreshed when the workbook is opened.

  1. Open the workbook containing the PivotTable.


  2. On the Insert menu, point to Macro, and then click Module.


  3. Enter the following code in the module sheet:

    
          Sub Auto_Open()
              Worksheets("Sheet1").PivotTables("PivotTable1").RefreshTable
          End Sub 


NOTE: The macro above will refresh a PivotTable called "PivotTable1" on the worksheet "Sheet1". You may need to change the name of the worksheet and PivotTable in the macro above to work in your situation.

Note also that name of the PivotTable can be found in Step 4 of the PivotTable Wizard.

  1. Save and close the workbook.



STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. The problem was corrected in Microsoft Excel 97 for Windows and Microsoft Excel 98 Macintosh Edition.

Additional query words: 5.00a 5.00c XL5 XL7

Keywords : kbtool
Version : WINDOWS:5.0,5.0c,7.0; MACINTOSH:5.0,5.0a
Platform : MACINTOSH WINDOWS
Issue type :


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