+ Reply to Thread
Results 1 to 7 of 7

Combobox Query

  1. #1
    Forum Contributor Alice21's Avatar
    Join Date
    04-22-2010
    Location
    Wales, United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    173

    Combobox Query

    Hi

    I am looking to set up a user form with multiple comboboxes so that when you select an item from the first box the list in the second box only shows options that are relative to the first box. To be able to do this do i need to set up multiple lists first?

    I've never had to do this before so I'm looking for starter points

  2. #2
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: Combobox Query

    is it possible.
    One from many ways to do this is:
    1. Create UserForm
    2. Create two controls (ComboBox)
    3. Change name of first ComboBox into "cmb1"
    4. Change name of second CombBox into "cmb2"
    5. Paste below code into UserForm code section
    Please Login or Register  to view this content.
    5. Enjoy it !
    P.s. I attached working example of that UserForm
    Attached Files Attached Files
    Last edited by MaczaQ; 08-14-2012 at 05:29 AM.
    Best Regards
    MaczaQ
    ---------------------------------------------------------------------------------------------------------------------------
    If you are satisfied with the solution(s) provided, please mark your thread as Solved
    If you are pleased with my answer consider to rate it. To thank someone who has helped you, click on the star icon below their name.
    - This way you will add him some reputation points ... thanks in advance.

  3. #3
    Forum Contributor Alice21's Avatar
    Join Date
    04-22-2010
    Location
    Wales, United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    173

    Re: Combobox Query

    Thank you, I'll have a look and see if that works
    Many Thanks

    ---------- Post added at 10:34 AM ---------- Previous post was at 10:30 AM ----------

    I can't open the ZIP files

  4. #4
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: Combobox Query

    just do step by step what I wrote in points - that's have to work

  5. #5
    Forum Contributor Alice21's Avatar
    Join Date
    04-22-2010
    Location
    Wales, United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    173

    Re: Combobox Query

    OK.
    Could you explain this part of the code just so i understand it...

    list1 = Array(1, 2, 3, 4)
    list2 = Array(5, 6)
    list3 = Array("a", "b", "c", "d", 7, 8, 9)

  6. #6
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: Combobox Query

    when you will select first value ("zero") in combobox1 then values from Array (list1) will appear in Combobox2.
    The same way if you will select 3rd value in combobox1 then values from Array (list3) will appear in Combobox2.

    Of course presented values are only examples, You can use there any values You need.

  7. #7
    Forum Contributor Alice21's Avatar
    Join Date
    04-22-2010
    Location
    Wales, United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    173

    Re: Combobox Query

    I'll give it a go....Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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