Yes.
I presume that the listbox is being 'rowsourced' by a table/list in a sheet.
If it was me - I would make the listbox commandheads property false then place command buttons above the headings, that when clicked go to the source sheet and sort the data as required, then re-source the listbox property.
Userform listbox sort columns by clicking on header
STYoda
1
Reputation point
Hi,
In Excel vba, I have a listbox in a Userform and would like to sort the column when a column header is clicked.
Is this possible?
So, if I click on column 6 header then it will arrange all the columns by column 6 alphabetically, and then if I clicked column 6 again then it would reverse the order.
Thanks
ST
1 answer
Sort by: Most helpful
-
Martin 1 Reputation point
2022-01-18T22:58:08.26+00:00