The Digits property returns or sets the number of decimal digits to the right of the decimal point. Returns a null if all the cells in a range do not have the same number of decimal digits. Returns a variant.
Syntax
object.Digits
object.Digits = Digits
Parameter |
Type |
Description |
Digits |
short |
required; number of digits |
The NumericType property must first be set to something other than wksTypeGeneral before the Digits property can be applied.
Example 1
This example demonstrates how to return the number of digits to the right of the decimal point.
Debug.Print WksCellFormat. Digits
Example 2
This example demonstrates how to set the number of digits to the right of the decimal to four.
WksCellFormat.Digits = 4
Used by: WksCellFormat object