How can I define a parameter in my vb application? When I start the program from the command line, i.e. by c:\programs\myapp.exe -e, it shall execute a special subroutine inside the exe.
CHeck the command$ in the load event (or in sub main if thats your start sub).
It could look like:
----------------------------------------------------------
Private Sub Form_Load()
Select Case Command$
Case "-e": Call MySub1
Case "-e": Call MySub1
Case Else: MsgBox ("your must provide a parameter"
End Select
End Sub
----------------------------------------------------------
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.