BUG: Shell Returns Invalid Proc Call Even If App Starts

ID: Q114001


The 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.

Additional query words:

Keywords : kbprg
Version : :1.0; WINDOWS:4.0,5.0,7.0
Platform : WINDOWS
Issue type : kbbug


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