Double

This is short for double precision floating point
The double data type can contain any number in the following ranges:
More info Numbers > Floating Point


This can support 15 significant figures with 14 decimal places.
If you need greater precision (with less or no rounding errors) then you should use the Decimal


This data type contains a double precision floating point number
Negative numbers: -1.79769313486232 E308 to -4.94065645841247 E-324
Positive numbers: +1.79769313486232 E308 to 4.94065645841247 E-324
This data type uses 8 bytes
The default value is 0.


Public Sub RunDouble() 
Dim myDouble As Double
   myDouble = 1

   Do
      On Error GoTo ErrorHandler
      myDouble = myDouble * 2
      Debug.Print myDouble
   Loop

ErrorHandler:
   Stop
End Sub


© 2023 Better Solutions Limited. All Rights Reserved. © 2023 Better Solutions Limited TopPrevNext