+ Reply to Thread
Results 1 to 15 of 15

search textbox for listbox populated with lines in text file

  1. #1
    Registered User
    Join Date
    04-03-2019
    Location
    Nigeria
    MS-Off Ver
    2013
    Posts
    60

    search textbox for listbox populated with lines in text file

    There's a listbox that is populated with the lines in a text file, how do i code a textbox that will search/filter the listbox. i.e any key/letter i press, it should search and bring results even if the letter is at the middle of the line and when i press a backspace, the list should return?

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: search textbox for listbox populated with lines in text file

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Registered User
    Join Date
    04-03-2019
    Location
    Nigeria
    MS-Off Ver
    2013
    Posts
    60

    Re: search textbox for listbox populated with lines in text file

    here it is
    Attached Files Attached Files

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: search textbox for listbox populated with lines in text file

    Like this:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-03-2019
    Location
    Nigeria
    MS-Off Ver
    2013
    Posts
    60

    Re: search textbox for listbox populated with lines in text file

    it's not searching well

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: search textbox for listbox populated with lines in text file

    What does that mean?

  7. #7
    Registered User
    Join Date
    04-03-2019
    Location
    Nigeria
    MS-Off Ver
    2013
    Posts
    60

    Re: search textbox for listbox populated with lines in text file

    Quote Originally Posted by Kyle123 View Post
    What does that mean?
    for instance I typed "v"

    it ought to display the following lines
    Invoice
    Vision

    but it only display the line of Vision

  8. #8
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: search textbox for listbox populated with lines in text file

    It's case sensitive, are you saying you don't want that?

  9. #9
    Registered User
    Join Date
    04-03-2019
    Location
    Nigeria
    MS-Off Ver
    2013
    Posts
    60

    Re: search textbox for listbox populated with lines in text file

    Quote Originally Posted by Kyle123 View Post
    It's case sensitive, are you saying you don't want that?
    exactly, yes I don't want case sensitive

  10. #10
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: search textbox for listbox populated with lines in text file

    Stating that in the request would have been a good start.

    Anything else?

  11. #11
    Registered User
    Join Date
    04-03-2019
    Location
    Nigeria
    MS-Off Ver
    2013
    Posts
    60

    Re: search textbox for listbox populated with lines in text file

    Quote Originally Posted by Kyle123 View Post
    Stating that in the request would have been a good start.

    Anything else?
    Oh, I'm sorry, I never knew you'll need that.
    for now, nothing else

  12. #12
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: search textbox for listbox populated with lines in text file

    Try this:
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    04-03-2019
    Location
    Nigeria
    MS-Off Ver
    2013
    Posts
    60

    Re: search textbox for listbox populated with lines in text file

    Quote Originally Posted by Kyle123 View Post
    Try this:
    Please Login or Register  to view this content.
    good one. thanks.

    please, can you help me in this thread https://www.mrexcel.com/forum/excel-...text-file.html

  14. #14
    Registered User
    Join Date
    04-03-2019
    Location
    Nigeria
    MS-Off Ver
    2013
    Posts
    60

    Re: search textbox for listbox populated with lines in text file

    Quote Originally Posted by Kyle123 View Post
    Try this:
    Please Login or Register  to view this content.
    I'm sorry, I just discovered it converted all the items in the list box to lowercase. Is this how best it can be?

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

    Re: search textbox for listbox populated with lines in text file

    Different method.
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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. Filter UserForm Multicolumn ListBox. populated by RowSource. with TextBox/ComboBox
    By Alex.riccio in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-07-2016, 10:19 AM
  2. Add Headers to a Listbox populated from a Textbox
    By LGRL20 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-08-2016, 04:23 PM
  3. [SOLVED] Populated Textbox by listbox only showing first record
    By roelof bakker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-27-2014, 09:17 AM
  4. [SOLVED] Avoid duplicates in a listbox populated using search keyword
    By sivakumar123 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-10-2013, 08:28 AM
  5. Read text file to ListBox and Delete rows in ListBox and re-write text file
    By Nu2Java in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-29-2012, 09:42 AM
  6. Search listbox from textbox
    By zplugger in forum Excel General
    Replies: 12
    Last Post: 08-23-2012, 08:11 PM
  7. [SOLVED] Textbox to search listbox
    By zplugger in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-22-2012, 08:25 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