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
and
–4.94065645841247e–324
for negative values or between 4.94065645841247e–324 and 1.79769313486231e308 for positive values.
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.