XL5: GP Fault If SQLRequest Results Used in Custom Function

ID: Q113847


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


SUMMARY

When you use the SQLRequest function in a Microsoft Excel version 5.0 worksheet to generate a numeric result set, and you then create a custom function that uses the range that contains that result set, the hourglass pointer may appear, or you may receive one of the following error messages:

Excel caused a General Protection Fault in module EXCEL.EXE at 0025:12FC.
-or-
Excel caused a General Protection Fault in module OLE2DISP.DLL at 0002:3711.


WORKAROUND

If you use SQLRequest to generate a numeric result set, do not use that range of data in any subsequent macro code. For example, change the following


   Function AddMeUp(Range)
      AddMeUp = Application.Sum(Range)
   End Function 
so that it does not contain references to range. For example, use the following code instead:

   Function AddMeUp(Arg1, Arg2, Arg3, Arg4)
      AddMeUp = Arg1 + Arg2 + Arg3 + Arg4
   End Function 


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 version 7.0 for Windows 95.

Additional query words: SQL Request SQLREQUEST GP GPF MSQUERY hang crash

Keywords : kbprg
Version : WINDOWS:1.0,5.0
Platform : WINDOWS
Issue type :


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