Excel Vba Sort Listbox Descending. At a glance your code looks fine (although it contains a lot of redundancy - you add the items to the list box, then read them from the listbox, clear it and add them back again). Then why do you need to know how to do this using VBA? heading listbox sort userform vba & excel.
The items in a Listbox can be retrieved from an Excel range of cells by using the RowSource property.
I want to sort a column (it's a flagcolumn with Y/N).
As an alternative in the sort you can actually use the array properties of LBound and UBound for the first and last elements in the loop like the example below. Alternatively, you can download the file and test run it for yourself. Make sure you include the worksheet name otherwise the active sheet will be used.







