+ Reply to Thread
Results 1 to 5 of 5

Populate Listbox in Userform with named ranges with the help of option buttons

  1. #1
    Registered User
    Join Date
    02-02-2021
    Location
    Germany
    MS-Off Ver
    Office10
    Posts
    5

    Populate Listbox in Userform with named ranges with the help of option buttons

    Hi all,

    I have a Listbox1 in a Userform which is populated in RowSource with a named range.
    Now I want to add options buttons and populate Listbox1 with other named ranges depending on the option button.

    I tried a few codes but nothing is rellay working how it should.
    Does anyone have a simple solution for this?

    kind regards
    Simon

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Populate Listbox in Userform with named ranges with the help of option buttons

    The basic code is just:

    Please Login or Register  to view this content.
    If you need more specific assistance, you'll need to provide us with more detail - preferably a sample workbook.
    Rory

  3. #3
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Populate Listbox in Userform with named ranges with the help of option buttons

    give us a workbook to work with.
    see big yellow banner - how to upload a workbook.
    you have chosen the worst method of populating a listbox/combobox.
    torachan.

  4. #4
    Forum Contributor
    Join Date
    05-16-2011
    Location
    Philippines
    MS-Off Ver
    Excel 365/Excel 2016
    Posts
    315

    Re: Populate Listbox in Userform with named ranges with the help of option buttons

    I get your point.
    I imagine this with 2 listbox.

    Name range is "Category" on the listbox1 will appear Fruit,Color,Shape..

    So if I choose Fruit--another set of list will appear like apple, banana, oranges, lime, you can set a named range on this list as "Fruits", and then set an if condition to your listbox1 that if listbox1 option Fruit has been chosen, name range/row source of listbox2 will be "fruits".

    I guess this is the process you want?

  5. #5
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Populate Listbox in Userform with named ranges with the help of option buttons

    you could use cascading comboboxes - as you progress through the sequence each filters to the next level.
    torachan.
    Attached Files Attached Files

+ 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] assistance filter in listbox on userform using comboboxes based on option buttons
    By ABDELFATTA in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-11-2020, 09:12 AM
  2. [SOLVED] Using option buttons and textbox for searching listbox
    By sniper1 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-02-2020, 05:35 AM
  3. Filtered data in Listbox based on Option buttons EXCEL VBA
    By saucy_spider in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-20-2018, 12:36 AM
  4. [SOLVED] Userform Option Buttons To Populate Listboxes
    By ScotyB in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-25-2015, 10:07 PM
  5. [SOLVED] Populate userform radio (option) buttons based on data in worksheet
    By d.sanchez in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-24-2013, 01:21 PM
  6. userform with 6 option buttons to populate 1 listbox
    By simeonmein in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-23-2013, 05:18 PM
  7. VBA - Populate Listbox based on value selected in another ListBox (On Userform)
    By raaboo in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-12-2012, 11:18 AM

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