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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to test a program in VS's IDE when Main() is Function (not Sub) with argument(s)

Status
Not open for further replies.

IlyaRabyy

Programmer
Nov 9, 2010
566
0
16
US
Colleagues,
imagine you have what's in the subject line:

Code:
Function Main(ByVal tsArgs As String) As Boolean

and you want to run it in IDE, e.g. in Debug mode.
How do I pass a parameter in such a case?
Please advise.
TIA!

Regards,

Ilya
 
Assuming you are starting your program via Main rather than through a Form, then simply Application > Properties > Debug and enter the command line parameters there

Alternatively, just run from the Immediate window, eg

Msgbox(Module1.Main("test Argument"))
 
Already found it (in the Properties sheet), but thank you nonetheless, colleague!
[thanks]

Regards,

Ilya
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top