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: 6
Default Influence of IsEmpty function

Hi,

When updating the code of an old (working) UDF I tried to make it more
user-friendly by changing a part of the code with the "IsEmpty( ...)"
function.
But after this modification the UDF would only return a "0" when referenced
by a cell containing a formula.

I changed the UDF back to its original code but can't figure out tried what
happens with the code when using "IsEmpty(...)". The problem of returning 0
arrises as soon as I add "IsEmpty(...)" in the code. Even when it's only used
in a Debug.Print statement (ex. "Debug.Print isEmpty(UDFargument)")

Does the IsEmpty function do anything more dan returning "True" for a blank
cell or "False" ?


Original code:
If TypeName(Argument) = "Range" Then
Argument = Cell
.....
ElseIf ...
Argument = number
End If

When argument is a cell containing a formula: "=A1^2+3*A1+1"
= returns expected value

Changed to:
If IsEmpty(Argument) Then
Argument is cell with not evaluated formula
....
End If

or

Debug.Print IsEmpty(Argument)
If TypeName(Argument) = "Range" Then
Argument = Cell
.....
ElseIf ...
Argument = number
End If


When argument is a cell containing a formula: "=A1^2+3*A1+1"
= returns 0

 
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
IsEmpty function in VSTO Ed White Excel Programming 3 August 7th 08 10:54 AM
IsEmpty Arne Hegefors Excel Programming 3 September 19th 06 12:40 PM
Help with IsEmpty Fred Excel Programming 1 February 10th 04 03:12 PM
vba: isempty chick-racer[_37_] Excel Programming 3 November 17th 03 09:52 PM
Problem with IsEmpty Function Matt[_16_] Excel Programming 6 October 2nd 03 05:16 PM


All times are GMT +1. The time now is 12:27 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"