Results 1 to 2 of 2

Thread: Command Line Parameters

  1. #1
    Guest

    Post

    When launching a program I would like to pass a command line parameter or switch to the program (UTILPGM -B). How do I go about reading the command line parameter that I have passed the program using Visual Basic 6.0?

    ------------------
    Ritchie Short

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    You can achieve this using the Command function:

    Command Function - Returns the argument portion of the command line used to launch Microsoft Visual Basic or an executable program developed with Visual Basic.

    Example:
    Code:
    Private Sub Form_Load()
        If Command <> "" Then MsgBox "You passed the Command Line: " & Command
    End Sub
    ------------------

    Serge

    Software Developer
    [email protected]
    [email protected]
    ICQ#: 51055819


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