I was wondering if it's possible to send a command line from VB to the command prompt or the run command on the start menu and then run it?
/Smirre
Printable View
I was wondering if it's possible to send a command line from VB to the command prompt or the run command on the start menu and then run it?
/Smirre
use the shell function to call a program-
shell "c:\program.exe"
Regards
Chris
If you need to, you can also use Shell to run DOS commands. So, to use the DOS Copy command you could do this.
Code:Shell "command.com /c copy c:\file1.txt + c:\file2.txt c:\file3.txt"
When using the Shell function, you should set it's window style too or else, its going to be loaded, but no focus.
vbHide
vbNormalFocus
vbMinimizedFocus
vbMaximizedFocus
vbNormalNoFocus
vbMinimizedNoFocus
Shell(pathname[, windowstyle])