Command line switches as variables - TechRepublic
General discussion
February 5, 2002 at 03:19 AM
jcaravella2

Command line switches as variables

by jcaravella2 . Updated 24 years, 4 months ago

I am working on a project and would like to input a couple of switches for my
app on start how do I code the variables in VB6 normally in vbs I can use the
following:

Set InputItems=Wscript.Arguments
name1 = InputItems.item(0)
name2 = InputItems.item(1)

But I don?t know how to do the same with a vb6 executable.

What I want to do is read a switch provided when I execute my code and execute
different sequence of events (different set of code)once the program is
executed.

For instance, take the ping command, it will take either a machine name or an IP
as input – this is what I want to do. Any examples would be appreciated.

This discussion is locked

All Comments