+ Reply to Thread
Results 1 to 2 of 2

Remove items from a listbox as you type in a textbox

  1. #1
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    Remove items from a listbox as you type in a textbox

    Hi all,

    I'm very bad when it comes to formcontrols/activex stuff, so i thought I'll ask for help here once again:

    I've got a list- and a textbox in a sheet. The listbox is filled with names. I'd like to duplicate the functionality of some websites, that when you start typing in a textbox, it filters out the values that don't match the text that you've already entered. For example:

    a listbox has Alfa, Bravo, Charlie listed. When i type "A" in a textbox, I'd like Bravo and Charlie to dissapear. When i enter an "z" for that matter after the "A", so that "Az" is within the textbox, the listbox should show nothing at all and so on(hope you guys understand what i mean).

    Heres the code I got so far:

    Please Login or Register  to view this content.
    It does return an error. Someone can please help me out? Even if it worked, i fear that removing an item in the way i wrote it, would create an unwanted result(something similar to deleting rows while going from top to bottom instead the other way aroun).

    PS: if the original problem is easy, please can someone guide me how to make it work for both upper- and lowercase characters? I'd like it to accept both "A" and "a".
    If you think that my answer was helpful, please click on the "Add to this user's Reputation" button.

  2. #2
    Valued Forum Contributor
    Join Date
    03-17-2012
    Location
    Warsaw, Poland
    MS-Off Ver
    2007/2010
    Posts
    555

    Re: Remove items from a listbox as you type in a textbox

    problem solved:
    Please Login or Register  to view this content.
    Another question popped up though: how do i trigger the code if someone deletes some characters? The change event doesnt occur when someone hits backspace...

+ 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