View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Populating list box with number format data

try

..additem format(cell.value, "hh:mm:ss")
or
..additem cell.text

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Francis Brown wrote :

The following snipet of code populates a list box with time data from
the defined range.

On the cells in the originating worksheet the data is defined as
hh:mm:ss as the number format.

However when the list box displays it displays as 0.33476... etc

Can some one show me how to display as hh:mm:ss in the list box.

With Simple.ListBox5
.RowSource = ""
For Each cell In Cells(2, NextCol).resize(LastRow -
1, 1) .AddItem cell.Value
Next cell

End With