Excel: EXEC() Function Does Not Return Logical Values

Last reviewed: November 2, 1994
Article ID: Q63341

SUMMARY

Page 217 of the "Microsoft Excel Functions and Macros" manual incorrectly states in the description of the EXEC() function that "EXEC returns TRUE if the application specified by application_text is launched successfully, FALSE if the application is not found, if there is not enough memory to launch the application, or if MultiFinder is not being used."

EXEC() actually returns the number of applications opened since start-up [including the Finder and System and any desk accessory (DA) opened in the DA Handler, such as Microsoft Mail]. If the application is not found, or if there is not enough memory to launch the application, EXEC() returns a #VALUE! error and produces a macro error.

MORE INFORMATION

The EXEC(application_text) function opens another application from within a macro. The "application_text" argument refers to any legal Macintosh program name, in quotation marks. (Note: MultiFinder must be used.)

EXEC() does not execute Excel's Quit command. Even though the EXEC() function has activated a new application, Excel is still executing macro commands in the background. Functions such as ACTIVATE(), CUT(), and COPY() may still be used, but they will not have any effect in the new application.


KBCategory: kbother
KBSubcategory:

Additional reference words: noupd


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 2, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.