
Originally Posted by
Knoet
... I have a problem as we use comma's instead of dots, the calculatins are not correct. I tryed to replace the comma's by dots but i still have wrong calculations ...
How did you try to change it ?
Just use the 'Replace' function to achieve the desired effect, e.g.:
Dim nmbrtxt, prctxt, rslt
If Not IsNumeric(Number.Value) Or Not IsNumeric(Price.Value) Then Exit Sub
nmbrtxt = Replace(Number.Value, ",", ".")
prctxt = Replace(Price.Value, ",", ".")
rslt = Replace(Val(prctxt) * Val(nmbrtxt), ".", ",")
TotalSum.Value = rslt
Bookmarks