|
-
Nov 27th, 2000, 09:46 AM
#1
Thread Starter
Hyperactive Member
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
Visual Basic
C, C++
Java
Access
SQL Server
MCP, MCSD
-
Nov 27th, 2000, 09:48 AM
#2
Hyperactive Member
use the shell function to call a program-
shell "c:\program.exe"
Regards
Chris
-
Nov 27th, 2000, 09:54 AM
#3
Fanatic Member
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"
-
Nov 27th, 2000, 03:41 PM
#4
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])
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|