+ Reply to Thread
Results 1 to 4 of 4

Filter a listbox with a combobox and seach button

  1. #1
    Forum Contributor
    Join Date
    06-07-2014
    Posts
    213

    Filter a listbox with a combobox and seach button

    Dear pros,

    I need help with the attached small application please. Open the application and click on the LISTBOX button. I cannot seem to figure out the code for the Filter by Item button or the Filter by Representative button. I would like to select an item from either of those dropdowns in the search box, click on the relevant button and the list box will populate to show the results.

    For example, if I were to select Chocolate Bars from the dropdown and click filter by item, I want to see only the three lines [i.e. line 2, 6 and 7] present in the listbox, and I want to be able to doubleclick on any of those lines to go to the record if I wish.

    Similarly, if I select Robert from the other dropdown and click Filter by Representative, I want to see the relevant three lines [i.e. 4, 5 and 8] relating to Robert, present in the listbox, where I can again double click to go to the record [i.e. the data entry userform related to particular record selected.

    I know it might be a piece of cake for some of you but I spent a very long time trying to figure out this code but with no luck.

    I have attached a file for you to offer your coding magic!

    Thanks for your help!


    THIS HAS BEEN RESOLVED ALL. THANKS
    Attached Files Attached Files
    Last edited by Paul; 08-04-2014 at 01:19 PM. Reason: Highlighted message about thread being resolved.

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Filter a listbox with a combobox and seach button

    Please Login or Register  to view this content.
    conceptually i found this the easiest way to do it
    which is basically clear listbox and manually add every line back in that matches criteria via a loop

    the alternative way to do it is to "create" the list somewhere and use that list as rowsource
    this alternative method would be if you had another use of subset data you created with your filter

    should probably put something in there to reset to original form/list but you should be able to do that if you have come this far
    Attached Files Attached Files
    Last edited by humdingaling; 08-04-2014 at 03:31 AM.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Filter a listbox with a combobox and seach button

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

  4. #4
    Forum Contributor
    Join Date
    06-07-2014
    Posts
    213

    Re: Filter a listbox with a combobox and seach button

    jindon, wow - thanks for your help!

    humdingaling - thanks a lot too.

    I am sorry for cross posting - I am new to the forums and will note this for the future. If I can delete a post I will do so.

    I appreciate your help folks and sorry again for cross posting.
    Last edited by chin67326; 08-04-2014 at 03:39 AM.

+ 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. Populate listbox from command button using combobox
    By SamuelJackson in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 01-29-2014, 11:32 AM
  2. [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
  3. [SOLVED] excel vba filter values to listbox from combobox and save edit values in textbox
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-03-2013, 08:42 AM
  4. Replies: 2
    Last Post: 12-07-2012, 02:10 AM
  5. Combobox - Filter auto-filter worksheets (ActiveX)
    By Darms in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2011, 11:33 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