Results 1 to 2 of 2

Thread: Passing Args to VB

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    Vancouver, BC, Canada
    Posts
    84

    Post

    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?

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Any Parameters passed to your VB EXE can be accessed via the Command Function, eg.
    Code:
    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
    [email protected]
    [email protected]


    [This message has been edited by Aaron Young (edited 12-04-1999).]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width