I have a VBA Sub
whose signature Looks like so:
private sub xyz ( _
optional param_1 as string, _
optional param_2 as string _
)
xyz
might be called like so
call xyz("apple")
or
call xyz("banana", "")
or
call xyz("strawberry", "blue")
I want the function to be able to determine if the caller has explicitely specified a value for param_2
(which is the case in the 2nd and 3rd call).
I have tried param_1 is null
, param_1 is empty
and isNull(param_1)
, but nothing worked the way I'd have expected it.
So what is the canonical way to check if a Parameter value was specified?