Excel: GP Fault with Database Functions

Last reviewed: April 17, 1996
Article ID: Q93490
The information in this article applies to:
  • Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 4.0a

SYMPTOMS

If you are using Microsoft Excel for Windows and you use a database function such as DCOUNT(), DSUM(), or DAVERAGE() as the reference in a defined name, if the variable in this function is referenced later on in another sheet, you receive a general protection (GP) fault under Microsoft Windows 3.1 or an Unrecoverable Application Error (UAE) in Microsoft Windows versions 3.0 and 3.0a.

This error also occurs when a database function is referenced on a macro sheet using SET.NAME to define a new variable.

STATUS

Microsoft has confirmed this to be a problem in the versions of Microsoft Excel listed above. We are researching this problem, and will post more information here in the Microsoft Knowledge Base as it becomes available.

WORKAROUND

To avoid receiving a GP fault, create the defined name on the destination spreadsheet. For example, in the Refers To box in the Define Name dialog box you would use the following syntax

   =DSUM(Sheetname!Database,Field,Sheetname!Criteria)

where Sheetname is the name of the sheet containing the defined name of Database and Criteria.

If you receive the error message when you run a macro, you can define the variable name in the macro sheet to avoid the error message by using the following syntax:

   =SET.NAME("VariableName",DSUM(!Database,Field,!Criteria))

This statement defines "Variable Name" using the defined names of Database and Criteria on the active sheet.

REFERENCES

"User's Guide 1," version 4.0, pages 344-346 "Function Reference," version 4.0, pages 91-97 "User's Guide," version 3.0, pages 385-387 "Function Reference," version 3.0, pages 46-47


KBCategory: kbprb
KBSubcategory:

Additional reference words: 2.0 2.00 2.01 2.1 2.10 3.0 3.00 4.0 4.00 4.0a
4.00a GPF dcount dsum daverage reference dfunction


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: April 17, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.