+ Reply to Thread
Results 1 to 8 of 8

Combobox2 list depends on the choice of combobox1

  1. #1
    Registered User
    Join Date
    03-11-2017
    Location
    Philippines
    MS-Off Ver
    2013
    Posts
    59

    Combobox2 list depends on the choice of combobox1

    hi, everyone!

    I'm new to excel vba and I just need help.

    2 combobox are in a userform1

    possible rowsource:
    sheet1 for food lets say all is in row A
    Sheet2 for drinks

    Combobox1 as 2 choices e.g. food, drinks
    IF food is selected then rowsource from sheet1 will auto populate
    IF drinks is selected then rowsource from sheet2 will auto populate

    I'm not really sure on how to do this.
    I don't even have a sample code or something.
    I really hope someone can help me out. I would really appreciate it.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Combobox2 list depends on the choice of combobox1

    Tiem to start learning

    Maybe this link will help you on the way
    http://www.excel-easy.com/vba/exampl...mbo-boxes.html
    ---
    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

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Combobox2 list depends on the choice of combobox1

    If you can provide an example file with your food & drink lists in it, it will make things a lot easier to explain.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Valued Forum Contributor Maudibe's Avatar
    Join Date
    12-21-2016
    Location
    USA
    MS-Off Ver
    2010-2013
    Posts
    326

    Re: Combobox2 list depends on the choice of combobox1

    You can checkout the solution here:
    https://www.excelforum.com/excel-pro...ml#post4588867

    HTH,
    Maud

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Combobox2 list depends on the choice of combobox1

    Perhaps this - untested
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  6. #6
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Combobox2 list depends on the choice of combobox1

    ... and if all this doesn't help, then it's time to attach a a sample file with what you have and what you require

  7. #7
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Combobox2 list depends on the choice of combobox1

    Perhaps this will be more suitable:
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    03-11-2017
    Location
    Philippines
    MS-Off Ver
    2013
    Posts
    59

    Re: Combobox2 list depends on the choice of combobox1

    Hi, Everyone! I'm sorry for the very late reply. I really appreciate everyone's help!

+ 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. Change combobox2, 3 value according to combobox1 (userform)
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2017, 08:02 AM
  2. [SOLVED] Combobox2 lists dependent on selection of Combobox1
    By mariannehislop in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-30-2014, 02:17 AM
  3. data in form Combobox2 depends on selection from Combobox1
    By emortals in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-26-2014, 09:01 AM
  4. UserForm : ComboBox2 and ComboBox3 's value upon on Combobox1 's value
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-26-2014, 08:16 AM
  5. listbox of combobox2 depends on value choosen from listbox of combobox1
    By hassan khansa in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-30-2013, 12:11 PM
  6. [SOLVED] items in combobox2 depending on combobox1
    By minifreak in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-15-2012, 10:52 AM
  7. Combobox2 dependent on Combobox1
    By teacher_rob in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-19-2011, 10:10 AM

Tags for this Thread

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