+ Reply to Thread
Results 1 to 3 of 3

combobox filter based on textbox value

  1. #1
    Registered User
    Join Date
    07-25-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    22

    combobox filter based on textbox value

    Hello,

    I have a combobox with values made out off two cells. What I am trying to do is filter the values in the combobox based on my input in a textbox. I made a variant of both and did vbTextcompare. So far so good.

    Where I am experiencing troubles is when I want to do the vbTextcompare on multiple 'words' in the textbox1. I have split based on the " " in the textbox. The problem is the code I'm having is more of an OR. If one of the values in the split is present in the combobox-variant then it will be added. What I want is that if ALL the values in the split are present the item will be added to the combobox. How can I do that?


    Please Login or Register  to view this content.

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: combobox filter based on textbox value

    You can try using a boolean, check that if one of the comparisons do not match then set it to false. After checking, if the boolean is still true, then add it to the combobox.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-25-2013
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: combobox filter based on textbox value

    Thank you. That was the code I was missing in my thinking proces

+ 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] Excel Userform: Populate other controls (i.e. textbox & combobox) based on combobox select
    By MileHigh_PhD in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-22-2013, 04:50 PM
  2. TextBox value based on ComboBox value offset.
    By Steven8294 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-30-2012, 05:26 PM
  3. x2 Combobox's to filter sheet then output results from that row to a textbox
    By JonNot in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2012, 04:47 PM
  4. Update textbox based on ComboBox
    By staples in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-17-2009, 10:22 AM
  5. Filling Textbox based on Combobox selection
    By Borg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-22-2009, 02:55 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