Ok thanks for replying so quickly. I'll try that, but some of my apps do not have forms. They merely manipulate data w/o a display. Can pass command lines to those type of apps as well?
Start new project set the project properties
Project >> Properties >> Make (Tab) >> Command Line Arguments = BC
[this argument u can pass as command line param for compiled exe]
Then
'-- put this code in a module
Public Sub main()
Dim strParm As String
strParm = Command
Select Case strParm
Case "A"
MsgBox "here u put the stuff for command line paramete [ A ]"
Case "BC"
MsgBox "here u put the stuff for command line paramete [ BC ]"
Case Empty
MsgBox "here u put the stuff for command line paramete [ No params ]"
End Select
End
End Sub
'-- end of code line -------
To add to this, you would prabaly not want to leave it up to the user to detemine or guess what case to use when typing in the argument. You can add the following before validating the command line argument.
z:\myPath\MyVBapplicaton.exe -SomeCommand
strParm = UCase(Command)
...Unless the arguments should be case sensitive (highly unlikely).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.