Passing parameters into a VB 6.0 program

I need to start up a VB 6.0 program from a program on an AS/400 while passing in certain parameters. I already know how to launch a VB executible from the AS/400 but how do I pass in parameters to the program?
BucksAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AnswerTheManCommented:
you can update first some REGISTRY ENTRIES.
Th VB6 app will read those values from
registry.
0
tureCommented:
Bucks,

You should use COMMAND function to return command line arguments specified when starting the VB application.

If your VB application is named MyApp.exe in the directory C:\Test\ and you wish to pass the argument John, start your app like this:

C:\Test\MyApp.exe John

This code in your app will set the variable c to whatever you passed as a command line argument when starting the application and show the value.

Private Sub Command1_Click()
  Dim c As String
  c = Command
  MsgBox c
End Sub

Ture Magnusson
Karlstad, Sweden
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BucksAuthor Commented:
I quess I needed to tell you, I am NOT an avid VB programer. When you say to write to the registry, I have no idea of how to do this. Could you explain that in a little more detail?
0
BucksAuthor Commented:
That is exactly what I was looking for. Thank you.
0
tureCommented:
You are welcome, Bucks! I'm glad that I could be of assistance.

/Ture
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.