Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

define parameters in an exe 3

Status
Not open for further replies.

Holger

IS-IT--Management
May 18, 2001
9
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.
 
Hi,

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
----------------------------------------------------------

Sunaj
 
Sunaj,
thanks for your answer which I found late... Think this must work.
Holger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top