BUG: Shell Returns Invalid Proc Call Even If App Starts

Last reviewed: July 29, 1997
Article ID: Q114001
This information in this article applies to:
  • Microsoft Visual Basic Programming System, Applications Edition, version 1.0
  • Microsoft Excel for Windows 95, version 7.0
  • Microsoft Excel for Windows, version 5.0
  • Microsoft Project for Windows, version 4.0

SYMPTOMS

The Shell statement can cause a Invalid Procedure Call even though the Shell statement successfully started the desired application.

WORKAROUND

To work around this bug, turn error trapping on and trap the Invalid Procedure Call error as in this example:

   On Error Resume Next
   Shell("C:\WINDOWS\NOTEPAD.EXE")

   ' Invalid Procedure Call:

   If Err <> 5  Then
      ' Insert code to handle other errors here.
      ' Exit if fatal
   End if

STATUS

Microsoft has confirmed this to be a bug in Microsoft Visual Basic, Applications Edition, version 1.0 that comes with Microsoft Excel version 5.0 and Microsoft Project version 4.0. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

Keywords          : kbprg kbprg
Version           : 1.00
Platform          : WINDOWS
Issue type        : kbbug
Solution Type     : kbcode


================================================================================


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