XL5: Function Wizard Error When Function Contains LoopLast reviewed: September 12, 1996Article ID: Q121940 |
The information in this article applies to:
SYMPTOMSIn 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.
CAUSEThis error occurs because of the way the Function Wizard calculates the results of functions when you select them.
WORKAROUNDTo prevent this error from occurring, you can do any one of the following:
MORE INFORMATIONWhen 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() commandIf 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
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |