تابع mian را به صورت زیر تعریف کنید.
Module Module1
Sub Main()
Dim args() As String = System.Environment.GetCommandLineArgs()
For Each arg As String In args
Console.WriteLine(arg)
Next
Console.ReadKey()
End Sub
End Module
و یا به صورت زیر استفاده کنید.
Option Explicit
Public Sub main()
'Store command line arguments in this array
Dim sArgs() As String
Dim iLoop As Integer
'Assuming that the arguments passed from
'command line will have space in between,
'you can also use comma or otehr things...
sArgs = Split(Command$, " ")
For iLoop = 0 To UBound(sArgs)
'this will print the command line
'arguments that are passed from the command line
Debug.Print sArgs(iLoop)
Next
End Sub