Default Values for Parameters in a Sub
Posted on 2004-04-15
Can't really believe i'm asking this question cos it seems so obvious, but for some reason i cant find the correct syntax!
How do i set a default for a parameter in a sub?
Private Sub Example(MyVariable as Integer, MySecondVariable as Integer)
and i want to put
Example , 2
If no Parameter is entered, how would i set MyVariable to 1 for example?
At the moment i'm just getting an error saying argument not optional if i leave it blank!
Cheers in advance,