convert a string to a double

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to convert a string absolutely contains a number at all times to
a double for use of comparison and numerical calculation, VBA doesn't seem to
support the System.Convert.ToDouble() method... I have searched and searched
and can't find a way to do this... any help would be VERY appreciated!

For a little extra info (for anyone who wants to know) the number stored in
the text field is a four digit number with no decimal or anything else fancy
like that. I would not hesitate converting it to a different number if it
were easier.
 
Apparently I can manipulate the string as a number directly... hmm... that is
interesting, but is it safe?
 
SrMousse said:
Apparently I can manipulate the string as a number directly... hmm...
that is interesting, but is it safe?

Probably you're seeing the effect of an implicit conversion to one of
the number types. You can use either the CDbl() function or the Val()
function to explicitly convert your string to a Double.
 
Back
Top