ID: Q121940
5.00 WINDOWS kbtool kbmacro
The information in this article applies to:
In the versions of Microsoft Excel listed in the beginning of the article, if you use the Function Wizard to insert a function that contains a loop, you will receive an error message in the macro.
This error occurs because of the way the Function Wizard calculates the results of functions when you select them.
To prevent this error from occurring, you can do any one of the following:
-or-
-or-
When you use the Function Wizard to insert a function into a formula in Microsoft Excel version 5.0, the Function Wizard calculates the result of the function before it actually places the function in the formula.
If the function contains a loop, and if the function is written using the Microsoft Excel 4.0 Macro language, the Function Wizard cannot properly handle the loop, and a macro error will be reported at the locations in the macro where the following commands occur:
=FOR() command
=NEXT() command
=WHILE() command
If you choose the Continue or Halt button each time the Macro Error dialog
box is displayed, you will be allowed to continue working in the Function
Wizard.
Note that this error occurs ONLY when you use an MS Excel 4.0 function macro in Microsoft Excel version 5.0 for Windows.
This error does not occur when you use a function written in Visual Basic, Applications Edition, nor does it occur in Microsoft Excel version 5.0 for the Macintosh or in Microsoft Excel version 5.0c for Windows.
KBCategory: kbprb KBSubcategory:
Additional reference words: 5.00 function wizard formula
Version : 5.00
Platform : WINDOWS
Last Reviewed: September 14, 1996