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

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 professionals 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/support/supportnet/overview/overview.asp

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: execute load Docerr XL5

Keywords : kbcode kbdocerr
Version : MACINTOSH:5.0
Platform : MACINTOSH
Issue type :


Last Reviewed: November 9, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.