optional parameter
Thanks Tom.
--
"Jim Thomlinson" wrote:
You bet...
Sub test(Optional ByVal Stuff As Integer = 100)
MsgBox Stuff
End Sub
Sub TryIt()
Call test
Call test(50)
End Sub
Note when you call the sub the optional argument shows up in square
brackets. Also optional arguments must show up at the end of the argument
list.
--
HTH...
Jim Thomlinson
"Ben" wrote:
Hi all,
If there's a Optional parameter in the Sub:
Sub test( option....)
...
...
end sub
is the parameter pass by ref or by val in the optional paramater? Thanks.
Ben
--
|