controlling number of decimal spaces displayed

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
 
D

Dave Peterson

msgbox format(number,"0.000")

or

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top