|
-
Apr 13th, 2000, 01:07 AM
#1
Thread Starter
Addicted Member
How Can I run a program with
a word at the end to make it do
something different??
Thanks...
-
Apr 13th, 2000, 01:08 AM
#2
You can try something like this:
Code:
Call Shell("Notepad C:\MyFile.txt", vbNormalFocus)
-
Apr 13th, 2000, 01:19 AM
#3
Thread Starter
Addicted Member
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??
-
Apr 13th, 2000, 01:24 AM
#4
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:
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
Compile your program and run it from the command line:
YourProgram.exe Check
-
Apr 13th, 2000, 01:28 AM
#5
Thread Starter
Addicted Member
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
|