Excel: Macro Error at EXEC() Function, Must Use Full Pathname

Last reviewed: November 2, 1994
Article ID: Q48169

SUMMARY

In Microsoft Excel, if the full (correct) pathname is not used in the EXEC() function, a macro error will result, indicating the cell containing the EXEC() function.

When using the EXEC() function to open another application from within an Excel version 2.20 macro under MultiFinder, the entire pathname of the application must be included in the application text reference.

For example, if Microsoft Word is located on a hard disk named "HD20" in a folder named "Word Folder", the following is the correct pathname:

   "HD20:Word Folder:Microsoft Word"

The following is the correct syntax for the EXEC() function:

   =EXEC("HD20:Word Folder:Microsoft Word")

If the pathname is not specified, Excel will look in the current active directory for the specified application. If the application is not located in the active directory, Excel will return a macro error.


KBCategory: kbother
KBSubcategory:

Additional reference words: 2.20


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.