Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Differentiating between CDbl(0) and Nothing

Status
Not open for further replies.

TCopple

Programmer
Jun 5, 2007
4
US
I have a conditional that takes a double variable. Basically I need the conditional to run if the variable is the value of 0.0, but not if it's nothing.

Unfortunately it seems as though the type Double, treats a value of Nothing as 0.0

Anyone know a way around this? Is there a wrapper double object like in Java?

Thanks,
Tyler
 




NOTHING is a state for an OBJECT.

Condsider define as a Variant.

"When variables are initialized, a numeric variable is initialized to 0, a variable-length string is initialized to a zero-length string (""), and a fixed-length string is filled with zeros. Variant variables are initialized to Empty. Each element of a user-defined type variable is initialized as if it were a separate variable."

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top