
Originally Posted by
Akuini
Maybe something like this:
Hi Akuini and Norie,
Thank you Akuini for your code and thanks Norie for the idea which i started working on but looks like a it's a long road for me
.
In Akuini's code i changed a couple things like removing the zero which won't get removed by the code. I also had the code re-select the item that was sorted to the top since it got un-selected.
I'm having trouble though when applying your code to a multi-select list-box, code works fine when the list-box is limited to one selection.
Also, i inserted this bit to re-sort the items when a different selection is made in the combo-box:
and this bit to deselect the previously selected items:
, however, (and i think this may be what Norie was touching on) the items are mixed up internally. Meaning, even though the items are displayed properly they are not selected properly by the code anymore.
See attached workbook (the code will debug since the listbox is set to multi-select, if you change it to single select the code should run but it won't run properly)
Bookmarks