Link to home
Start Free TrialLog in
Avatar of rafistern
rafistern

asked on

Command line parameters

How do I pass command line parameters into my VB app?

Thanks,

Rafi
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gunsen
Gunsen

If command parameters are:  "test param 1"
...then:    Split(Command$)(1)
...returns: "param"
Hi,

If you want to pass the command line parameters to the EXE file then you can pass the parameters as...

Suppose your EXE file reside in C:\ and your EXE file name is TEST.EXE then you just have to write

C:\TEST.EXE Param1, Param2

In this case Param1 and Param2 are your parameters.

But if you want to pass the parameter while you are developing the application in the VB editor then you can mention them in the Project (Menu)... Project Properties... goto 2nd Tab and set the Command Line Parameter there.

Now if you want to read these command line parameter in the program then use Command()

Avatar of rafistern

ASKER

You all got the answer but angelIII was first :-)

Thanks guys!

Rafi