GP Fault If SQLRequest Results Used in Custom Function (113847)
The information in this article applies to:
- Microsoft Excel for Windows 5.0
- Microsoft Query
This article was previously published under Q113847 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.
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.
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbProgramming KB113847 |
---|
|