change commas to dots in double variables

Hello guys.

I'm really new in writing macros and not that good in inglish but I'm trying my best.

After many hours tring to find why my code return an error I've found that is because the getSize are returning the value with a comma instead of a dot.

My Corel works with commas because I work in pt-BR so I can't change this in the program. I was looking for a way to replace the "," with a "." but it only seems to work in strings.

My code by now:

Set rs = ActiveSelection
rs.getSize w, h

If rs.SizeWidth <> 0 Then

w = Replace(w, ",", ".")
MsgBox "@width = {" & w & "" & myUnit & "}"

ActivePage.Shapes.FindShapes(Query:="@width = {" & w & "" & myUnit & "}").AddToSelection

The Replace(w, ",", ".") in this case only remove the comma, I think it's because the var is a Double.