Hi,
Is there any way in Visual Basic to have a function with default values for parameters (just like in C++)?
Thanks.
Regards,
Jagan.
Printable View
Hi,
Is there any way in Visual Basic to have a function with default values for parameters (just like in C++)?
Thanks.
Regards,
Jagan.
You can set default values.
private Function Testing(optional byval iTest as Integer =1) as string
if itest =1 then
testing="works"
else
testing = str(itest)
endif
end function
should be something like that. Check a vb book for the correct arglist.
-David