-
I am trying to create an application the would respond to 'switches'. At run time if I run: 'MyApp /a' would execute something different from 'MyApp /b'.
Obviously, this can be done (an please forgive my lack of technical terms...), but I have no idea how.
Anybody knows ?
Thanks.
-
If you use the Command function it will return all arguments passed to the application.
Code:
Private Sub Form_Load()
Select Case LCase$(Command)
Case "/a"
'do whatever
Case "/b"
'do something else
End Select
End Sub
Good luck!
-
That works until the end-user puts too many arguments on. You need to use Split() on Command, so that you get a list of all the arguments.
-
It works great ! Thanks...