Thread: ShellExecute
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Unger Dave Unger is offline
external usenet poster
 
Posts: 153
Default ShellExecute

Hi Rick,

Thanks- actually I just this minute discoverd that for myself. I
hardly ever use cmd.exe (obvious), took me a little while before the
light dawned. After invoking the k switch, it became apparent that
there was an error in the path name.

I really appreciate your help.

regards,
Dave



On May 15, 10:12*pm, "Rick Rothstein \(MVP - VB\)"
wrote:
Try it this way...

Sub Macrosh()
* *x = Shell("cmd.exe /k C:\start.lnk", 1)
End Sub

I changed the /c to /k... doing that should keep the Command window open so
you can read any error messages that might have been generated. Knowing what
the error is (assuming there is one) should give you a hint at what you will
need to change.

Rick