MTroutwine
asked on
Move Item To Top Of ComboBox
I am working with a combobox that is sorted. I want to add an item after the sorted items are entered that will be at the top of the combobox... like NONE.
I don't want to use a space or an underscore to move it to the top... anyway to do this???
Thanks!
I don't want to use a space or an underscore to move it to the top... anyway to do this???
Thanks!
Indeed, sort the items first and then add them to the combo box is the only way of doing this.
'with.sorted is true
Combo1.AddItem "Bunk"
Combo1.AddItem "Abunk"
Combo1.AddItem "NONE", 0
Combo1.AddItem "Bunk"
Combo1.AddItem "Abunk"
Combo1.AddItem "NONE", 0
note that your combo has .sorted=true in properties.
deighton,
You are right. I overlooked that solution.
Anthony
You are right. I overlooked that solution.
Anthony
i am late!
..so did I, it was an accident, I was trying to change sorted to .false then add it to the top - you can't change to .false, but adding it to the top still seems to work.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry for the delay on this... I used your idea of "(None)". Works fine now.
Glad you liked the idea (even if it came from Microsoft), and thanks for the "A" grade.
Anthony