+ Reply to Thread
Results 1 to 5 of 5

code to sort data in multi select listbox

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    code to sort data in multi select listbox

    Hello,
    Below code works flawlessly with a single select userform listbox, it does not work with a multi select userform list box.
    I indicated in red font where the code's debugger goes off. The purpose of the code is to sort to the top of the list the selected items:
    Please Login or Register  to view this content.
    Looking forward to all responses.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: code to sort data in multi select listbox

    If you are using a multi column listbox

    then surely you should be using something like:-

    Please Login or Register  to view this content.
    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.

  3. #3
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: code to sort data in multi select listbox

    Quote Originally Posted by mehmetcik View Post
    If you are using a multi column listbox

    then surely you should be using something like:-

    Please Login or Register  to view this content.
    Hi and thank you very much for your response.
    I applied the revision but the debugger went off again.
    Please see attached sample workbook.
    Attached Files Attached Files
    Last edited by kosherboy; 04-19-2016 at 09:15 PM.

  4. #4
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: code to sort data in multi select listbox

    Quote Originally Posted by mehmetcik View Post
    If you are using a multi column listbox
    Dear mehmetcik,
    It's possible we may be misunderstanding each other since in my original post i stated that the code did not work in a multi SELECT listbox (a list box that can have more than one selection made), however, I see you wrote multi COLUMN listbox.
    You will see in the attachment i provided in post #4 that the only change made to the list box was the switch from single select to multi select, the column remained at the default setting of no columns at all.
    You response as well as all other responses will be greatly appreciated

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: code to sort data in multi select listbox

    This Userform looks extremely complicated. I think it is over complicated.


    What are you trying to achieve.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Unhide 2nd Listbox when condition is met in the 1st multi-select listbox
    By pjbassdc in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2015, 09:58 AM
  2. [SOLVED] ListBox Multi-Select - Help
    By KyrieInfinity in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2013, 12:54 AM
  3. Multi-Select ListBox
    By yawnzzzz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2011, 08:55 AM
  4. Multi select listbox code not working when 2 listboxes on sheet
    By excel_vb in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-08-2010, 10:53 AM
  5. Listbox Multi Select
    By MikeT in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-27-2006, 03:30 PM
  6. using a multi-select listbox to pull data
    By dreamz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-17-2005, 05:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1