Hi Guys,
Is it Possible to get command line Parameters in VB, like in C/C++. If Possible then how can we read those Parameters. I need this very urgently. thnx for ur help.
Printable View
Hi Guys,
Is it Possible to get command line Parameters in VB, like in C/C++. If Possible then how can we read those Parameters. I need this very urgently. thnx for ur help.
Command$ returns the command line. It's a single string with all of the command line paramters in it.
If you need to use multiple command line arguments, then you can easily use the Split() function, e.g:
In VB:Code:C:\> MyProgram.exe cmd1/cmd2/cmd3
Code:Dim sCommandLine() As String
sCommandLine = Split(Command$)
For I = 0 To UBound(sCommandLine)
MsgBox sCommandLine(I)
Next I
Nice. Really this has helped me.