Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 -- |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
optional parameter
That must have been a good answer. You think I'm Tom. I'm flattered...
-- HTH... Jim Thomlinson "Ben" wrote: 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 -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to choose if I use a parameter or not in a parameter query | Excel Discussion (Misc queries) | |||
Optional hyphen? | Excel Discussion (Misc queries) | |||
format optional parameter | Excel Worksheet Functions | |||
format optional parameter | Excel Discussion (Misc queries) | |||
Excel2000: How to check for Optional parameter=Nothing | Excel Programming |