LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Optional arguments and IsMissing


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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Optional IsMissing is not working korokke[_3_] Excel Programming 6 May 28th 06 04:57 PM
IsMissing Function mikelee101[_3_] Excel Programming 0 March 21st 06 06:41 PM
Representation of optional parameters in Function arguments window compound[_5_] Excel Programming 0 January 17th 06 11:32 PM
IsMissing() Kuzemdoo Dawuni Excel Programming 3 October 15th 04 08:01 PM
IsMissing() Kuzemdoo Dawuni Excel Programming 3 October 15th 04 03:19 AM


All times are GMT +1. The time now is 09:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"