Thread: Trailing Zeros
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
aftamath77 aftamath77 is offline
external usenet poster
 
Posts: 30
Default Trailing Zeros

Thanks Dave. "The simplest answers..."

"Dave Peterson" wrote:

Since they're text in the combobox, just add them as text:

With ComboBox1
.ListRows = 20
.AddItem "0.375"
.AddItem "0.500"
'or even
.AddItem format(0.75,"0.000")
End With

aftamath77 wrote:

I'm designing a combobox with decimal numbers. When I use .additem and type
in the numbers, it drops the trailing zeros. (ie. 0.500 becomes 0.5
automatically) I need the zeros for precision and consistancy purposes. Is
there a line I can include in this code?

With ComboBox1
.ListRows = 20
.AddItem (0.375)
.AddItem (0.5)
.AddItem (0.75)
End With


--

Dave Peterson