Starting an external application from VB 
Author Message
 Starting an external application from VB

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.

Thanks in advance for your help.

Iain Cowan



Sat, 30 Jul 2005 18:48:59 GMT  
 Starting an external application from VB


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.

> Thanks in advance for your help.

> Iain Cowan

Take a look in the help!;)
Shell(pathname[,windowstyle])
so just skip the Start.
/Henning


Sat, 30 Jul 2005 19:42:35 GMT  
 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



Sat, 30 Jul 2005 20:01:06 GMT  
 Starting an external application from VB
Try:

Shell ("c:\my documents\program.exe", vbNormalFocus)

Mike


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.

> Thanks in advance for your help.

> Iain Cowan



Sat, 30 Jul 2005 22:01:29 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Starting an external application from within VB

2. Start MS Project 2002 from external application

3. Starting external application from Word/Parsing XML

4. AppActivate starting external application

5. Start external application by ASP script

6. External Application Start

7. Starting external application

8. Start/Stop external .exe from vb 6.0

9. call external program from vb application

10. Close External Application from VB

11. Close External Application in VB

12. Passing data external VB application

 

 
Powered by phpBB® Forum Software