PDA

Click to See Complete Forum and Search --> : Command Line Parameters


Dec 8th, 1999, 01:09 AM
When launching a program I would like to pass a command line parameter or switch to the program (UTILPGM -B). How do I go about reading the command line parameter that I have passed the program using Visual Basic 6.0?

------------------
Ritchie Short

Serge
Dec 8th, 1999, 01:26 AM
You can achieve this using the Command function:

Command Function - Returns the argument portion of the command line used to launch Microsoft Visual Basic or an executable program developed with Visual Basic.

Example:

Private Sub Form_Load()
If Command <> "" Then MsgBox "You passed the Command Line: " & Command
End Sub


------------------

Serge

Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)