The following code does not deliver the required results. The separator in the region setting of Windows is defined as ","'. I attempted to overrule it in the code but it does not seem to work.
>>> use code - tags <<<
Your advice will be very much appreciated!
>>> use code - tags <<<
Code:
Sub str2dbl()
Dim s As String
Dim d As Double
Application.DecimalSeparator = "."
Application.ThousandsSeparator = ","
Application.UseSystemSeparators = False
s = "12.34"
d = CDbl(s)
'd gets the value of 1234
End Sub
Last edited by a moderator: