Name

Application.FixedDecimalPlaces [= setting]

Synopsis

Sets the placement of the decimal assumed during data entry. Default is 2. The following code configures Excel to treat the entry 1000 as 0.1, 45000 as 4.5, and so on:

Sub TestDecimal(  )
    ' Turn on fixed decimal.
    Application.FixedDecimal = True
    ' Set the decimal place.
    Application.FixedDecimalPlaces = 4
End Sub

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.