P
pinkfloydfan
Hi there
In a UDF with an Optional argument where the type is a long, if the
argument is passed an empty cell or variable then the IsMissing
returns false. So, for example:
Function test(arg1, arg2, Optional arg3 as long)
If IsMissing(arg3) then
'code
End If
'rest of code
End Function
If arg3 is passed say range A3 and there is no data in A3 then the
IsMissing returns false: in fact the function thinks that arg3 is
zero.
As zero is a option I want to test for it does not help me decide if
arg3 is missing or not.
Any ideas how to figure out if the optional argument really is
missing?
Thanks a lot
Lloyd
In a UDF with an Optional argument where the type is a long, if the
argument is passed an empty cell or variable then the IsMissing
returns false. So, for example:
Function test(arg1, arg2, Optional arg3 as long)
If IsMissing(arg3) then
'code
End If
'rest of code
End Function
If arg3 is passed say range A3 and there is no data in A3 then the
IsMissing returns false: in fact the function thinks that arg3 is
zero.
As zero is a option I want to test for it does not help me decide if
arg3 is missing or not.
Any ideas how to figure out if the optional argument really is
missing?
Thanks a lot
Lloyd