Before using the variable try converting it to Double.
For instance:
 Code:
Dim $x
CDbl($x)