Reputation: 1415
I saw this question related question
In this the string was "wibble", but what if my string is in a variable. Then how would I pass it. Example
Dim lng As String
how do I pass lng as a command line to the exe application.
Upvotes: 0
Views: 4098
Reputation: 20980
If you want to receive command line parameters:
command line passed to vn6 application is captured by a global string variable called "command"
NOTE: That variable will contain entire command line, not in array like in case of C. You would need to parse command variable explicitly.
e.g. somewhat like:
Dim lng As String
Dim lngValue As long
....
....
sub main
lng = command$
lngValue = val(lng)
....
....
end sub
If you want to send command line parameters:
you can simply do it using string concatenation:
Shell("""PathName.exe"" """ & lng & """ ""wibble 2""", vbNormalFocus)
Upvotes: 4