+ Reply to Thread
Results 1 to 12 of 12

filter combobox options

  1. #1
    Forum Contributor
    Join Date
    09-09-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    102

    filter combobox options

    Hello,

    I am trying to filter combobox2 based on combobox1 selection. What I would like is when Zak is selected in combobox1, combobox2 only shows values with Zak in the title.

    Is this possible?

    Thanks

    Z

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,339

    Re: filter combobox options

    Yes. Please post a sample workbook showing how you are populating the two controls.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Contributor
    Join Date
    09-09-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    102

    Re: filter combobox options

    I can't post the workbook but... combobox1 is looking up a rowsource of authors and combobox2 needs to filter that rowsource to show only items that contain Zak.

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,339

    Re: filter combobox options

    If you can't post a workbook, we need to be specific.

    Is combobox1 populated using the RowSource property, or AddItem, or List?
    What's the source for combobox2? (they presumably aren't the same if you are selecting an item from the list in combobox1.)

  5. #5
    Forum Contributor
    Join Date
    09-09-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    102

    Re: filter combobox options

    combobox1 is populated using rowsource property. combobox2 does not yet have a source as I'd like the source to be a filter of combobox1

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,339

    Re: filter combobox options

    Here's a simple example:
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    09-09-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    102

    Re: filter combobox options

    Thank you romperstomper, however that code just mirrors the option selected in combobox1

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,339

    Re: filter combobox options

    Well, if no other items in the list contain that selected text, yes, that is what it will do.

  9. #9
    Forum Contributor
    Join Date
    09-09-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    102

    Re: filter combobox options

    I have adapted your code slightly to try and show all the items within a rowsource that contain a specific piece of text.

    Please Login or Register  to view this content.
    What I would like is for combobox2 to return a list of values that contain whatever is selected in combobox1. Is that possible?

    Thanks

    Z

  10. #10
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,339

    Re: filter combobox options

    It's not at all clear to me what you are doing - a censored workbook example would make this a lot easier. My best guess would be:
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    09-09-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    102

    Re: filter combobox options

    That's it!!!!! Thank you I've been trying to do this for about 3 weeks!

  12. #12
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,339

    Re: filter combobox options

    Glad to help. Please don't forget to mark the thread Solved using the Thread Tools link at the top.

+ 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] Filter Combobox base on selection from previous combobox
    By ciapul12 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-18-2013, 07:25 PM
  2. [SOLVED] Make combobox list options dependant on selection in another combobox within a userform
    By Vladimir_Dobvchenko in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-23-2013, 05:30 AM
  3. Change ComboBox Options
    By sgp in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-13-2011, 08:43 AM
  4. Options in Combobox
    By cruiser102 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2009, 04:52 PM
  5. Combobox options based on the input of another combobox
    By afmullane in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-03-2006, 08:50 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