Click to See Complete Forum and Search --> : Passing Args to VB
jkurpias
Dec 4th, 1999, 02:44 AM
I have an Access2000 database that calls a VB6 exe. I need to pass a couple of strings to the exe. How do I get my VB program to pickup the passed strings?
Aaron Young
Dec 4th, 1999, 06:41 AM
Any Parameters passed to your VB EXE can be accessed via the Command Function, eg.
Private Sub Form_Load()
If Len(Command) Then
MsgBox "You Passed the Following Command Line: " & Command
Else
MsgBox "You Didn't Pass any Command Line Parameters."
End If
End Sub
Compile the EXE and run with a Command Line..
Project1.exe Hello There
Will result in a Dialog saying "You Passed the Following Command Line: Hello There"
------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
adyoung@win.bright.net
[This message has been edited by Aaron Young (edited 12-04-1999).]
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.