need help pls
How can the list box be rearranged based on sort a column of 8 in the list box, knowing that the list box is made up of 20 columns?
thank s for your interesting
need help pls
How can the list box be rearranged based on sort a column of 8 in the list box, knowing that the list box is made up of 20 columns?
thank s for your interesting
I would write the contents of your listbox to Excel
Then Sort the Data in Excel
Finally Copy the Data back to the Listbox
Please Login or Register to view this content.
Last edited by mehmetcik; 10-24-2021 at 05:10 PM.
My General Rules if you want my help. Not aimed at any person in particular:
1. Please Make Requests not demands, none of us get paid here.
2. Check back on your post regularly. I will not return to a post after 4 days.
If it is not important to you then it definitely is not important to me.
thanks for that but i have a long code used it in list box with some conditions thus i need to sort the column no 8 in the listbox
Hi, I found this code snippet a long time ago and use it now works for me:
Place is in a normal VBA Module (not in the Userform's project)Please Login or Register to view this content.
In the userform you call the routine AFTER the listbox has been filled and the syntax is:
7 is the column number, if your Listbox has 20 columns the count starts a 0, the Listbox1 is the name of your Listbox, this will sort the listbox on the selected column ascending, if you want it descending orderPlease Login or Register to view this content.
Happy codingPlease Login or Register to view this content.
---
Hans
"IT" Always crosses your path!
May the (vba) code be with you... if it isn't; start debugging!
If you like my answer, Click the * below to say thank-you
Hi, you still asleep in Egypt?
Have you tried the code?
thank you very much
i was away
Okay, no problem, I was just curious to hear it it worked.
The advantage is that you can use for any list box and don't have to program it separately
yes, thank you
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks