+ Reply to Thread
Results 1 to 3 of 3

Sort userform list based on option button selection

  1. #1
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Sort userform list based on option button selection

    I'm looking for suggestions to sort a user form list based on which option button is selected. It's not the most elegant of solutions so any suggestions would be greatly appreciated. I have also inclued an image of how the user form looks.

    Once the user has selected an item from the list the "Load Info" button loads the requested info into another user form. But i now need to provide an option on how the list is sorted to help the user.

    Thanks

    userform.PNG

    Please Login or Register  to view this content.

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

    Re: Sort userform list based on option button selection

    The best way is to put your data into a worksheet
    Sort that worksheet any way you want
    Then read it into your List.

    Please Login or Register  to view this content.
    would fill the listbox, you would need to set its properties to 3 columns in my example.

    Another way is to read your data into an array, sort the array and then read the array into the listbox

    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
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Re: Sort userform list based on option button selection

    I will probably just re-write to have two seperate user forms with the specific sort in each, then i will provide 2 2 buttons on worksheet specific to each sort type.

    I have a further question regarding filtering the data loaded into the combo box which i will post as new.

    Thanks for your help

    Please Login or Register  to view this content.

+ 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] Preselect Listboxes based on Option button selection
    By Biffer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-28-2014, 04:59 AM
  2. [SOLVED] UserForm Option Button selection to determine which macro to run.
    By strud in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-09-2013, 08:53 AM
  3. [SOLVED] Change combobox list based on option button
    By zbor in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-24-2012, 04:31 AM
  4. Userform Option Button to Show/Hide Another Option Button on same Userform
    By R_S_6 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-26-2010, 09:44 AM
  5. Option button Selection
    By excelkeechak in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-16-2009, 08:44 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