Results 1 to 6 of 6

Thread: command line arguments

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2001
    Posts
    30

    command line arguments

    Does anyone know how to pass a command line arguments into a vb program?

    the equivelent in vb script is wscript.arguments(0), but how do I do this with vb?

  2. #2
    New Member
    Join Date
    Apr 2001
    Posts
    7

    Smile

    Code:
    Sub Main()
      Dim strCommands As String
      strCommands = Command$
    End Sub

  3. #3
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Command returns arguements
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  4. #4
    Megatron
    Guest
    To send a Command Line argument
    Code:
    Shell "MyApp argumant", 1
    To accept command line arguments:
    Code:
    Private Sub Form_Load
        ' They are stored in the Command variable.
        MsgBox Command
    End Sub

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Feb 2001
    Posts
    30

    seperating the arguments

    command brings them in as a group, anyway to grab multiple arguments separately.

    Thanks for the quick three responses, earlier.

  6. #6
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    you would have to split it up with instr and mid functions. im about to leave so dont have time to write up an example, but myabe someone else can get you a good example.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

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