XL97: User-Defined Function with Application.Run Returns #VALUE! (170308)
The information in this article applies to:
- Microsoft Excel 97 for Windows
This article was previously published under Q170308 SYMPTOMS
A user-defined Visual Basic for Applications function that carries out the
Run method of the Application object (Application.Run) returns the #VALUE!
error value.
CAUSE
Microsoft Excel enters recalculation mode when a user-defined function is
called from a worksheet cell. While in recalculation mode, Application.Run
is disabled.
RESOLUTION
To correct this problem, install Microsoft Excel 97 Service Release 1
(SR-1).
In Microsoft Excel 97, if you create a function that calls another user-
defined function, call the function directly rather than using the Run
method. (See the "More Information" section later in this article for
sample code that demonstrates calling the function directly.)
There is no workaround if the user-defined function calls a function
contained in a dynamic-link library (DLL or XLL). You must use
Application.Run to call these functions.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Excel 97 for
Windows. This problem was corrected in Microsoft Excel 97 SR-1.
For additional information about SR-1, please see the following article in
the Microsoft Knowledge Base:
172475
OFF97: How to Obtain and Install MS Office 97 SR-1
REFERENCES
For more information about user-defined functions, click the Office
Assistant in the Visual Basic Editor, type user-defined function, click
Search, and then click to view "Function Statement".
NOTE: If the Assistant is hidden, click the Office Assistant button on the
Standard toolbar. If Microsoft Help is not installed on your computer,
please see the following article in the Microsoft Knowledge Base:
120802
Office: How to Add/Remove a Single Office
Program or Component
| Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
|---|
| Keywords: | KB170308 |
|---|
|