
Starting an external application from VB
On Tue, 11 Feb 2003 10:48:59 -0000, "Iain Cowan"
Quote:
>Can anybody help, I need to execute an external .exe file from within VB. I
>have tried to use the code:
>Shell ("Start C:/my documents/program.exe)
>this looks like it runs the program but it actually does nothing and the
>program does not run. The program that I am trying to run was written in
>Fortran 95 and the exe has
>been made by the salford compiler.
You don't need "start"
Shell ("C:/my documents/program.exe") should suffice.
On the other hand you may need to put that in quotes because of the
space in the filename. In that case..
Dim s as string
s = chr$(34) & "C:/my documents/program.exe" & chr$(34)
shell(s)
One fo those will work, as long as the path is correct of course.
--
Regards, Frank