View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Harlan Grove[_5_] Harlan Grove[_5_] is offline
external usenet poster
 
Posts: 97
Default Convert an empty string to a double

"Adrian T" wrote...
...
Well..I guess I have to manipulate the way how the code
calls for loops. It's just nice if there is a function
that could convert "" to a NULL double.

...

You are *FAILING* to understand that there isn't any NULL double in VB[A]. If
your variable is of type Double, then it can only contain available numeric
values because VB[A]'s Double type won't/can't store IEEE floating point
exception values or anything other than numeric values. So, if you're using
Double type, you can't do what you want to do - PERIOD. If you're using Variant
type, you can store NULL values in them, as well as strings and various other
junk, but you'll need to use VB[A]'s IsNull function to screen them out.

There may be several ways to improve your code, but you haven't been willing yet
to offer it up for scrutiny. Too damn much guesswork without your original code,
so the only answer to give you is, "yes, you'll have to modify your code."

--
To top-post is human, to bottom-post and snip is sublime.