+ Reply to Thread
Results 1 to 9 of 9

Filter listbox with rowsource using Textbox

  1. #1
    Registered User
    Join Date
    02-08-2018
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    5

    Filter listbox with rowsource using Textbox

    Hi guys, i am new here. needed some help for my excel VBA "UPDATERECORD" userform to filter the listbox with rowsources with a textbox. I attached my excel file for your reference.


    Link:
    https://www.dropbox.com/s/rwbjfrw231...KING.xlsm?dl=0


    Thanks in advance!!
    Last edited by AliGW; 02-08-2018 at 02:30 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,664

    Re: Filter listbox with rowsource using Textbox

    Will you please attach a sample Excel workbook here? Many members will not or cannot access file-sharing sites.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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

    Re: Filter listbox with rowsource using Textbox

    One way to do it.
    Attached Files Attached Files
    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.

  4. #4
    Registered User
    Join Date
    02-08-2018
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    5

    Re: Filter listbox with rowsource using Textbox

    Quote Originally Posted by bakerman2 View Post
    One way to do it.
    Thanks Mate!! +Repo!! BIG BIG THANKS!! <3

  5. #5
    Registered User
    Join Date
    02-08-2018
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    5

    Re: Filter listbox with rowsource using Textbox

    Quote Originally Posted by AliGW View Post
    Will you please attach a sample Excel workbook here? Many members will not or cannot access file-sharing sites.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Noted! will be alert on this next time. thanks

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

    Re: Filter listbox with rowsource using Textbox

    Edited the rest of your code so all works when using Search Box.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-08-2018
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    5

    Re: Filter listbox with rowsource using Textbox

    Dear Sir, Thanks for the help. I need your help again because i encounter some data cant be found using the search button. Could it be done by using case sensitive? example for ABC company. i type the "BC" in the text box and the bottom list box will auto filter all the outcome for the company with "BC". its unnecessary for search button if could do that. Thanks in advance for the help!! highly appreciated. too new for this advanced coding!!

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

    Re: Filter listbox with rowsource using Textbox

    Change this
    Please Login or Register  to view this content.
    to this If
    Please Login or Register  to view this content.
    Do remember that by doing so you would need an exact match of upper and lower cases to retrieve any result.

  9. #9
    Registered User
    Join Date
    02-08-2018
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    5

    Re: Filter listbox with rowsource using Textbox

    Noted , thanks for the respond sir!! will try to sort it out

+ 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. fast filter data on listbox with textbox
    By totalchaoz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-18-2016, 06:28 AM
  3. VBA textbox to edit rowsource of listbox specific column
    By chrismccarthy17 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-25-2016, 10:03 PM
  4. [SOLVED] VBA code to filter listbox as you type in a textbox Solved by : Sixthsense
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-27-2014, 10:51 AM
  5. filter listbox without rowsource
    By WCJanssen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2009, 08:32 AM
  6. Filter Rowsource for Listbox
    By Noah in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-08-2005, 10:55 PM

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