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

Accept parameter in VB 6 program from another VB program

Status
Not open for further replies.

kimr

Programmer
Jun 12, 2001
16
US
How do I accept a parameter in a VB 6 program from another VB 6 program? In the first program I am calling the other program with a line similar to this:

sCommand = App.Path & "\pgmname.exe " & passedparm
RunCmd sCommand

The question is, how do I bring passedparm into the second program (pgmname.exe)?
 
I would suggest the following:

in your entry point (Sub Main or Form_Load)

dim CommandLine as String

CommandLine = Command()

you can then parse out the CommandLine string for any or all of the incoming parameters


Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top