Sub Main and Parameters 
Author Message
 Sub Main and Parameters

Sub Main and Parameters
I'm new to VB in general and I'm having problem with what I think should be
simple.
Q: What do I need to do so that Sub Main (startup)  accepts parameters?


Tue, 22 May 2001 03:00:00 GMT  
 Sub Main and Parameters
Hi

Sub Main should not get parameters.
It should be the starting point of your program.

Maybe you would like to read the command line ? Then you just have to use
Command().

Sub Main ( )

    Dim sCommand As String

    sCommand = Command()

End Sub

In the ulickely event you still want to use parameters, declare them as
optional (Don't do this !)

Sub Main (Optional arg1 As Variant)

End Sub

Quote:

>Sub Main and Parameters
>I'm new to VB in general and I'm having problem with what I think should be
>simple.
>Q: What do I need to do so that Sub Main (startup)  accepts parameters?



Tue, 22 May 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Pass parameter to Sub Main() procedure

2. passing parameters to Sub Main

3. Pass parameter to Sub Main() procedure

4. Parameters with Sub Main

5. sub Main for public modules?

6. How to change caption on a sub from text on main form

7. Error in Sub Main accessing Application data

8. Where is the sub main()

9. sub main

10. sub main()

11. Showing a form from within Sub Main.

12. Invock a dll that has sub Main(), instead of a form as entry point

 

 
Powered by phpBB® Forum Software