Decimal data type
Decimal variables are stored as 96-bit (12-byte) unsigned integers, together with a scaling factor (used to indicate either a whole number power of 10 to scale the integer down by, or that there should be no scaling) and a value indicating whether the decimal number is positive or negative.
The scaling factor is the number of digits to store to the right of the decimal point, and ranges from 0 to 28.
With a scale of 0 (no decimal places), the largest possible value is +/-79,228,162,514,264,337,593,543,950,335.
With a scale of 28 decimal places, the largest value is +/-7.9228162514264337593543950335 and the smallest, non-zero value is +/-0.0000000000000000000000000001.
Note
At this time, the Decimal data type can only be used within a Variant; that is, you cannot declare a variable to be of type Decimal. You can, however, create a Variant whose subtype is Decimal by using the CDec function.
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.