How Can I run a program with
a word at the end to make it do
something different??
Thanks...
Printable View
How Can I run a program with
a word at the end to make it do
something different??
Thanks...
You can try something like this:
Code:Call Shell("Notepad C:\MyFile.txt", vbNormalFocus)
Sorry..
I didnt say What I wanted clear enough.
I need to be able to make my program
run differently when i want it too.
Like type C:\ClientAlert\Alert.exe "Check"
and it will check something for me.
Can you give me the code to do this??
Ohh I see, you want to pass arguments to your program??? If yes, then it is very easy to do.
You would have to use Command function which brings back the argument list:
Compile your program and run it from the command line:Code:Private Sub Form_Load()
Dim strCommand As String
strCommand = Command
If strCommand = "" Then
MsgBox "You didn't pass any arguments."
Exit Sub
End If
MsgBox "You passed: " & strCommand
End Sub
YourProgram.exe Check
Thankyou!