Sub Exercise() Dim Distance As Double End Sub
Instead of As Double, the type character you can use is #:
Sub Exercise() Dim Distance# End Sub
A Double variable can hold a number between –1.79769313486231e308
To convert a value to double-precision, you can call the CDbl() function:
Number = CDbl(Value to Convert)
In the parentheses of CDbl(), enter the value that needs to be converted.