+ Reply to Thread
Results 1 to 7 of 7

How do I populate a specific range in one ComboBox based of selection of another ComboBox?

  1. #1
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    How do I populate a specific range in one ComboBox based of selection of another ComboBox?

    Hello all,

    I have a UserForm that has a few ComboBoxes on it. What I am looking for is code to automatically show a range in ComboBox2 when Press# is selected in ComboBox1.
    Example: If ComboBox1 is Press# then ComboBox2 Show Range A3:A31 of Master List sheet.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,379

    Re: How do I populate a specific range in one ComboBox based of selection of another Combo

    Maybe:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    15,987

    Re: How do I populate a specific range in one ComboBox based of selection of another Combo

    Hi Tom,

    Search the net for "Cascading ComboBox" or "Dependent ComboBox" and there are lots of examples and instructions.

    See:
    http://www.xl-central.com/create-cas...-userform.html or
    http://chandoo.org/wp/2014/02/13/dyn...ns-that-reset/ using named ranges.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: How do I populate a specific range in one ComboBox based of selection of another Combo

    Thank you both for your replies.
    xladept, I tried your code which was similar to some that I had tried on my own and neither of them worked. ComboBox2 is always blank when you click the dropdown. It's probably because I'm not placing the code in the right place to associate it with the UserForm.

    Mr Marvin,
    Long time no see. I will look at both of your links and see if either will work.

    Edit* Duh me, I wasn't assigning the code to the ComboBox. Still not working, but getting closer
    Last edited by gmr4evr1; 08-03-2015 at 07:44 PM.

  5. #5
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: How do I populate a specific range in one ComboBox based of selection of another Combo

    xladept,
    I wasn't able to get the code you provided to work, I kept getting various errors. It did however get me on the correct path to the following code which does work
    Please Login or Register  to view this content.
    Marvin,
    I might be wrong but it looks as if the 1st link you provided was to add from a list. The 2nd link was working from comboboxes in a cell on the sheet. I'm not sure if either of these would have worked for my situation as I just wanted a list to populate in the combobox of a userform from a range in a master list sheet, so, not sure if the link would have worked.
    However, both links did provide useful information for other situations that I have come across

    I thank you both for your help and time.

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,379

    Re: How do I populate a specific range in one ComboBox based of selection of another Combo

    Hi Tom,

    Glad you solved it and thanks for the rep!

  7. #7
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: How do I populate a specific range in one ComboBox based of selection of another Combo

    Oops, forgot to mark as solved earlier, done now. You're welcome, thank you for getting me there.

    I did discover another issue with one of my textboxes as I was testing the userform, but I will create a new post/thread for that.

+ 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. Textbox to populate based on combobox selection
    By acroley1 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-11-2015, 04:12 PM
  2. automatically populate form based on combobox selection
    By zak.horrocks in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-15-2014, 10:16 AM
  3. Populate Listbox based on Combobox selection
    By wallybur in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-27-2014, 04:48 AM
  4. Populate textbox based off ComboBox Selection
    By ladams41 in forum Excel General
    Replies: 1
    Last Post: 04-09-2014, 10:13 AM
  5. Populate TextBox based off ComboBox selection
    By ladams41 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2014, 01:24 PM
  6. Userform Combobox to populate based on selection in another combobox
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-14-2014, 03:34 PM
  7. Populate a activeX combobox from a selection of another combobox
    By ptramel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-28-2009, 06:50 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