P
Peter
Dears,
I want to create a UDF that accept user to enter optional parameter, but
these parameters are not really optional, they can skip this parameter or I
can define a default value for it, but they DO need to enter a comma. I don't
know how to express but something like:
=MyFunc(Param1, Optional Param2 As Variant = "", Optional Param3 As Variant
= "") As String
I have to force user to "enter" UDF like: =MyFunc("test1", , ), and display
MsgBox if they enter =MyFunc("test") or =MyFunc("test", )
I'm now stuck in the using of Optional keyword, and Variant VS Object
datatype, and IsMissing, IsEmpty or Is Nothing checking...
Please help!
Thanks,
Peter
I want to create a UDF that accept user to enter optional parameter, but
these parameters are not really optional, they can skip this parameter or I
can define a default value for it, but they DO need to enter a comma. I don't
know how to express but something like:
=MyFunc(Param1, Optional Param2 As Variant = "", Optional Param3 As Variant
= "") As String
I have to force user to "enter" UDF like: =MyFunc("test1", , ), and display
MsgBox if they enter =MyFunc("test") or =MyFunc("test", )
I'm now stuck in the using of Optional keyword, and Variant VS Object
datatype, and IsMissing, IsEmpty or Is Nothing checking...
Please help!
Thanks,
Peter