string to double
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
Hi, when converting a string to double value i am losing my comma:
Dim str as string Dim value as double set str = "123.451" value = CDbl(str)
output: 123451 anybody has a solution? happy coding, -mark
os win2000 vba office 2003, vc++ 6.0I would guess that this behaviour is by design. A Double datatype is only capable of storing a NUMBERIC value. A comma is not a number, and hence it cannot be stored. Only way to represent the comma is to store it in a string "Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox