tuck
asked on
Passing a variable to VB exe
I need to pass a variable to my vb prog is there a way to do this,
What i need to end up with is my.exe "string"
So that i can do certain events with different strings passed to the exe...
Thanks in advance
What i need to end up with is my.exe "string"
So that i can do certain events with different strings passed to the exe...
Thanks in advance
ASKER
What i realy mean is to have command line switches for the compiled exe as i want to do different things depending on the switch entered in by a user..
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
deighton has just answer before me.
use the command$ function :
Dim sToExecute as string
sToExecute = Command$
Select sToExecute
Case "Format":
' *** Format code
...........
Case "Delete":
' *** Delete code
...........
Case "Copy":
' *** Copy code
...........
use the command$ function :
Dim sToExecute as string
sToExecute = Command$
Select sToExecute
Case "Format":
' *** Format code
...........
Case "Delete":
' *** Delete code
...........
Case "Copy":
' *** Copy code
...........
ASKER
Thanks for the respone
ASKER
Thanks for the response
I am not sure what your "string" is used for, but you can always put it to an INI file. In your exe, you read it from the INI file before anything else, and you can change the content of the INI file.
regards
Dalin