> Is it possible to pass arguments to Sub Main() in a VB program?
>
> Rather than writing two nearly identical programs in VB, I want to write
> only one whose passed argument (from the command line) tells the program
> which of two paths of execution to take.
VB supplies a function that will allow you to do what you want.
The function is named Command (look it up in the help files) and
if it empty (that is, "") then no command line argument was
passed. If it is not empty, then the Command function will return
the contents of the command line and you can parse it as needed.
Rick
The Mighty Menace - 27 Sep 2005 16:31 GMT
Rick,
Thanks for the info. But after I posted this request I did what I should
have done right after searching VB6's help database. That is, do a search on
the Web.
There I found a piece of code that works great at
http://www.devx.com/getHelpOn/10MinuteSolution/20366
Again, thanks.
Dennis
> > Is it possible to pass arguments to Sub Main() in a VB program?
> >
[quoted text clipped - 11 lines]
>
> Rick
Hello Dennis,
use the "Command" function.
Best Regards,
HKSHK
> Is it possible to pass arguments to Sub Main() in a VB program?
>
[quoted text clipped - 4 lines]
> Dennis C. Fait
> Mosherville, Michigan