Combo Box question
Sam,
there is a simple solution, add the item bevore all other items in the list.
See the changed code below.
Helmut.
"Sam" schrieb im Newsbeitrag
...
I have a list of dates that has several of the same date, however they are in
chronological order, named DateList. A combo box in a userform displays these
with the UserForm_Initialize event:
For each c in Range("DateList")
If c < c.Offset(-1, 0) Then
Me.cBoxDates.AddItem Format(c, "m/d/yyyy")
Replace this line with
Me.cBoxDates.AddItem Format(c, "m/d/yyyy"), 0
This places the new item at the top of the list, automatically reversing the
order
End If
Next
How can I get the combo box to display the dates in reverse order (latest to
earliest) if the list is earliest to latest?
Thanks,
Sam
|