sendtojp
asked on
200 extra pts:From 'run' Hello.exe "My String" passes String in program
200 extra points, I asked it in the wrong topic
https://www.experts-exchange.com/questions/20932956/From-'run'-Hello-exe-My-String-passes-String-in-program.html
Is it possible to pass a variable from the command line ('Run' in windows) just by opening it providing a parameter from the command line.
Example:
I have a VB EXE called 'Hello.exe'
using a Short-Cut or user types under 'run'
Hello.exe "My String"
The program receieves a String to use in code
What data types may you pass.
-JP
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry about the two Question Posts.
I will figure out how to handle this
-JP
I will figure out how to handle this
-JP
Just create a new project. Add the following code:
Private Sub Form_Load()
MsgBox Command()
end
End Sub
Compile it, make an exe (fe project1.exe)
Then run - cmd:
project1.exe "Hello"
Private Sub Form_Load()
MsgBox Command()
end
End Sub
Compile it, make an exe (fe project1.exe)
Then run - cmd:
project1.exe "Hello"
ASKER
Sorry I created a mess, not only did I ask the question under the wrong area, I accidently posted it twice.
I will give pg_india and Dhaest points on each question pg_india was first to answer but Dhaest clearified it better.
Only one question remains the data types this supports and can you have multiple variables.
Thank You,
-JP
I will give pg_india and Dhaest points on each question pg_india was first to answer but Dhaest clearified it better.
Only one question remains the data types this supports and can you have multiple variables.
Thank You,
-JP
Text1.Text = Command()
And then start your program like Hello.exe 'My string'