MXL5 Err Msg: "Run-time Error..." with Shell Example

Last reviewed: February 2, 1998
Article ID: Q118991
The information in this article applies to:
  • Microsoft Excel for the Macintosh, versions 5.0, 5.0a

SYMPTOMS

On page 210 of the "Visual Basic User's Guide," the Shell example for the Macintosh generates the following error message when you run it in Microsoft Excel version 5.0 for the Macintosh:

   Run-time error 53:
   File not found

The example code is as follows:

   Shell "Microsoft Word"
   WordChannel = DDEInitiate("Microsoft Word", "HD1:Documents:EB_White")

When the above code is run in a subroutine, you receive the error message shown above.

CAUSE

The code above starts Microsoft Word and establishes a DDE channel to the file EB_White. The Shell line, which starts Microsoft Word, causes the error message.

WORKAROUND

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:

   http://www.microsoft.com/supportnet/refguide/ 

To open Microsoft Word for the Macintosh without receiving an error message, use either of the following sample shell statements:

   Sub Open_Word()
      Shell MacID("MSWD")
   End Sub

   NOTE: "MSWD" in the Shell line must be typed in uppercase letters.

   -or-

   Sub Open_Word()
      Shell "Macintosh HD:Microsoft Word:Microsoft Word"
   End Sub

   The above line works because the path to the application file has been
   included. Keep in mind that the path will vary depending on where
   Microsoft Word is installed.


Additional query words: 5.00 execute load Docerr XL5
Keywords : kbcode kbdocerr
Version : MACINTOSH:5.0
Platform : MACINTOSH


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: February 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.