Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command line parameters

Status
Not open for further replies.

bboggessswcg

Programmer
Jun 6, 2003
34
0
0
US
Can anyone give me a little help with a command line launch? I would like to get an example of how to grab the switch or parameter passed from the command line. Like if I launch the VB program from the command line "get.exe wsdisp", I want to be able to read in teh wsdisp into a variable. Thanks in advance for your help.
 
There is a variable in vb called command it will hold the value wsdisp and you can transfer the value in command to a variable.

strSwitch = Command
 
Store all of your arguments in an array using the split function.

Private Sub Form_Activate()
Dim CmdLnArg() As String
CmdLnArg = Split(Command$, " ")
End Sub

Swi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top