+ Reply to Thread
Results 1 to 6 of 6

Conflicting events? Clear ListBox for a search and display as you type userform

  1. #1
    Registered User
    Join Date
    03-02-2023
    Location
    Pacific
    MS-Off Ver
    2016
    Posts
    2

    Conflicting events? Clear ListBox for a search and display as you type userform

    I need to include a Search and Display function(??), where user types in Textbox name "txtName" and search and displays matching entries in Listbox "lstPipeline". Please see my workbook.

    Search will be confined to Table named "Database" [on "Database" sheet] in the column named "Applicant's Name", but would like to display all columns in the listbox.

    Upon showing the form sub routine Reset () is called which displays all rows of the table. I have tried one or two txtName _Change() subs but always get run time error highlighting clear listbox, hence conflicting events in the title.
    Attached Files Attached Files

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,964

    Re: Conflicting events? Clear ListBox for a search and display as you type userform

    Hi e_songib

    Welcome to the forum...Give this a go...
    I've removed all your other code...
    Type in txtname box to filter or clear txtname box to reset...
    Please Login or Register  to view this content.
    I am assuming that on selecting a entry from the lsitbox, you will want the other boxes above to populate...This can be dealt with later...
    For future reference, it is wise to keep the userform controls as default names...Easier to manipulate and loop if necessary...
    Attached Files Attached Files
    Last edited by Sintek; 03-03-2023 at 04:22 AM.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Conflicting events? Clear ListBox for a search and display as you type userform

    Greetings to all.

    e_songib: In this variant I don't change the way you load your listBox (via RowSource) because it's the most practical way.

    I changed the position of the browser and the userform is ready to be edited: add, modify or remove data.

    And the width of the columns of the listBox is calculated automatically.
    Attached Files Attached Files
    Last edited by beyond Excel; 03-03-2023 at 01:28 PM.
    You are always very welcome if you add reputation by clicking the * (bottom left) of each message that has helped you.

  4. #4
    Registered User
    Join Date
    03-02-2023
    Location
    Pacific
    MS-Off Ver
    2016
    Posts
    2

    Re: Conflicting events? Clear ListBox for a search and display as you type userform

    Thank you, works as requested.

  5. #5
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Conflicting events? Clear ListBox for a search and display as you type userform

    .
    a) It seems that you forgot to thank the help by clicking on the * that is below and to the left of post #3.

    b) I'm glad it was useful to you.

    c) And if your project gets stuck again, all you have to do is start a new query.

  6. #6
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,964

    Re: Conflicting events? Clear ListBox for a search and display as you type userform

    Quote Originally Posted by e_songib View Post
    Thank you, works as requested.
    Glad to have contributed...tx for rep +

+ 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] Search in UserForm and Display in ListBox
    By jaylyn_cpa in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-30-2019, 03:43 AM
  2. [SOLVED] Issue with search and display result on ListBox as you type on a TextBox
    By rakotonirinas in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-31-2019, 07:15 AM
  3. Using a listbox to display search results in a userform.
    By aayush_1231 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-28-2019, 05:11 AM
  4. Problems with listbox display and search button with the userform
    By SpArKy999 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2017, 04:21 AM
  5. Search Multiple Worksheets using a Userform and display in listbox.
    By nathandavies in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 11-18-2014, 10:22 AM
  6. [SOLVED] Userform Search and Display rows in ListBox
    By Nu2Java in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-13-2012, 10:15 PM
  7. [SOLVED] UserForm ListBox Events
    By David in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-01-2005, 10:05 AM

Tags for this Thread

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