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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read command-line arguments into VB program 3

Status
Not open for further replies.

valdosta

MIS
Dec 18, 2002
50
US
Hi,

How can I read a command-line argument into VB6 program? i.e. c:\>myprogram.exe para1

Thanks in advance!
 
Check out the [tt]Command$[/tt] function in VB help which returns the command line string.
 

The "Command" function returns the argument portion of the command-line used to launch the app.

(paraphrased from the VB help file)

---------

You can also set the command line arguments on the "Make" tab of the project properties dialog so you can test your app while coding.


Net_Giant

What fun is a technology if you can't crash the OS?
 
You can use the Command() function.

In your example c:\>myprogram.exe para1, the Command function will hold the value "para1"

Regards,

Patrick
 
Thank you all! Yes, Command$ function returns the parameters.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top