View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Combo Box - format output as time

How about removing that link to the range and just add the values to the
combobox.

dim myCell as range
dim myRng as range

with worksheets("Sheet1")
set myrng = .range("a1:A10")
end with

with me.combobox1
for each mycell in myrng.cells
.additem mycell.text
'or
'.additem format(mycell.value, "hh:mm AMPM")
next mycell
end with



Robert Mark Bram wrote:

Hi All,

I created a combo box that is linked to a set of cells that contain
numbers but for which I have selected to format as time i.e. the cells
look like this:

12:00 AM
12:30 AM
1:00 AM
1:30 AM
2:00 AM
2:30 AM

My problem is that when I select a value with the combo box, it
displays them as the number, not as a formatted time and I cannot see
which property to edit on the combo box to have the output formatted as
time.

Any help would be most appreciated!

Rob
:)


--

Dave Peterson