Running an executable from VBA

AJSatori

Board Regular
Joined
Jul 11, 2002
Messages
62
I am trying to execute a .exe from VBA with this line of code...

retval = Shell("c:\ftpqc.bat", 1)

but it is not working....
I can run the ftpqc.bat by it's self and it works fine but I can not get it to run out of the VB, can someone please give me some advise

:oops:
 

Some videos you may like

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

NdNoviceHlp

Well-known Member
Joined
Nov 9, 2002
Messages
2,660
I'm guessing but maybe have a look @ the Run method in the VBA help. Maybe something like this? Dave
Code:
Application.Run "ftpqc.bat"
 

Watch MrExcel Video

Forum statistics

Threads
1,118,223
Messages
5,570,975
Members
412,352
Latest member
Radek Z
Top