controlling number of decimal spaces displayed

  • Thread starter Thread starter ChuckM
  • Start date Start date
C

ChuckM

How can I control the number of decimal places displayed?
I have:
Dim Number As Single
and I want it to always display with 3 decimal places.
thanks
chuck
 
msgbox format(number,"0.000")

or

with range("a1")
.value = number
.numberformat = "0.000"
end with
 
Back
Top