+ Reply to Thread
Results 1 to 6 of 6

Filter userform combobox based on specific criteria

  1. #1
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Filter userform combobox based on specific criteria

    Any suggestions on how i can filter the data loaded into combobox on userform to specific value/text as shown below. The userform does load but the data is not filtered. Any help would be appreciated

    Thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Filter userform combobox based on specific criteria

    myRng is still the same after the filter.

    If you only want to show the results of the filter you'll need to extract the visible cells from myRng and then add them one by one using AddItem.
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Re: Filter userform combobox based on specific criteria

    Norie,

    Thanks for your response.

    would the following extract the visible cells?

    Please Login or Register  to view this content.
    I'm not sure on what needs to be done with AddItem?

  4. #4
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Re: Filter userform combobox based on specific criteria

    It would appear that i have posted the same question twice yesterday. After posting the first question yesterday i couldn't see my post, hence shortly after i re-posted the same question albeit with a slightly different title, my apologies to all. Below is the link.

    HTML Code: 

  5. #5
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Re: Filter userform combobox based on specific criteria

    I can now filter the range with the specified criteria. However i now get a run-time error 381 (Could not get the List property. Invalid property array index) when i select a record to load in to the main user form. any thoughts?

    Please Login or Register  to view this content.

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Filter userform combobox based on specific criteria

    If the result of the filter is a non-contiguous range you can't use List like that, you need to use AddItem as I suggested.
    Please Login or Register  to view this content.

+ 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. Import the Data based on Specific Filter Criteria
    By mvinay in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-09-2014, 12:05 AM
  2. UserForm Combobox Wild Search Filter based on first letter entry
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-23-2014, 08:17 AM
  3. [SOLVED] Save and Send Userform data to a specific email address based on Combobox value
    By GAMU in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-30-2013, 01:13 PM
  4. Need VBA help to filter and copy data based on specific criteria
    By astrial in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-13-2013, 10:48 AM
  5. Index/Match Formulas - Search/Filter Based on Specific Criteria
    By Christopher.Belanger in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-10-2012, 08:42 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