GP Fault When Using INDIRECT in a Formula for a Defined Name

ID: Q123579


The information in this article applies to:
  • Microsoft Excel for Windows, version 5.0


SYMPTOMS

In Microsoft Excel, when ALL of the conditions listed in the "Cause" section of this article are true, you may receive the following general protection (GP) fault:

Excel caused a General Protection Fault in module EXCEL.EXE at 00EE:22CA.


CAUSE

This error will occur if ALL of the following conditions are true:

  • A defined name in the workbook has a formula using the INDIRECT function.


  • -and-

  • A cell in the workbook contains a formula referring to the defined name.


  • -and-

  • The defined name used in the worksheet formula is prefaced with the worksheet name.


For example, assume you have a name "test" defined on a worksheet (Sheet1), and assume that it has the formula =INDIRECT($A$1). If you then refer to that defined name with the formula =Sheet1!test, in a cell in the workbook, a GP fault will occur. This behavior is incorrect. Under these circumstances, Microsoft Excel should return the #REF! error value because the reference to the globally defined name is invalid.


WORKAROUND

To refer to the defined name, define the name as a local sheet name (Sheet1!test) instead of as a global book name (test). Once you do this, the reference to the name will be valid.


STATUS

Microsoft has confirmed this to be a problem in Microsoft Excel version 5.0 for Windows. This problem was corrected in Microsoft Excel version 5.0c for Windows.


REFERENCES

For more information on creating names, choose the Search button in Help and type either of the following:

names, creating
-or-
names, overview

Additional query words: 5.0a link gpf xlwin

Keywords :
Version : WINDOWS:5.0
Platform : WINDOWS
Issue type :


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