Am i doing this right?

I want to “get a formatted string as currency” (with local miles an decimals separators) and also i want to “get formatted string as a double”
Am i doing it right?

[code] 'GET FORMATTED STRING AS CURRENCY

dim formatted_string as string
formatted_string = “623’201.568”

dim format_string as string
format_string = “############.00”

dim num_currency as Currency
num_currency = val(str(CDbl(formatted_string),format_string))

msgbox str(num_currency)[/code]

[code] 'GET FORMATTED STRING AS DOUBLE

dim formatted_string as string
formatted_string = “623’201.568”

dim format_string as string
format_string = “############.00”

dim num_double as double
num_double = val(str(CDbl(formatted_string),format_string))

msgbox str(num_double)[/code]

You are doing too many steps. Val and Str are not necessary. CDbl does all the work for you already.

num_currency = CDbl(formatted_string)

num_double = CDbl(formatted_string)

ok, thanks @Tim Hare