Format: strange?

I use the following code

Dim bedrag as single
Dim sbedrag as string

sbedrag = format(bedrag,"####.##")

When bedrag = 18,6611 then sbedrag = 18,66

Why is there a “,” and not a “.”?

In the Format method, the “.” indicates the decimal separator and is replaced with the decimal separator used by your locale settings.

If you truly want a “.” as the decimal separator, use Str instead as it ignores the locale settings.

@ Paul
Thanks!!