+ Reply to Thread
Results 1 to 5 of 5

Excel Userform Search Command- Listbox displays results

  1. #1
    Registered User
    Join Date
    06-06-2017
    Location
    plymouth
    MS-Off Ver
    2010
    Posts
    2

    Post Excel Userform Search Command- Listbox displays results

    I'm currently building a userform for work so that my colleagues can add suppliers details and search them too.

    I am currently struggling to write a code for the search button, so that when either the textboxes or checkboxes are selected or entered - the results are listed in the listbox below.

    The last time I used Excel for something like this, was years ago in school - so my memory is being tested.

    I am using VBA in excel to construct my userform. I currently, dont have any code for what i am looking for as i have been unsuccessful for when i am trying to make it work. Basically, i have a search command button, which when textboxes or checkbox are filled in, once clicked on it will bring up results in the list box displayed below. I have 5 textboxes and 8 checkboxes. I have a datasheet which the data gets added to when the user enters the relevant information and clicks the add button.
    Attached Files Attached Files
    Last edited by KathyES93; 06-06-2017 at 05:42 PM.

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Excel Userform Search Command- Listbox displays results

    there is no data to work with here....
    hard to tell you how to code it without the data structure

    here is a search textbox to listbox provided recently
    https://www.excelforum.com/excel-pro...ank-cells.html

    the code shouldnt be hard to follow but if you have queries about something in the code let me know ill try to help
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Excel Userform Search Command- Listbox displays results

    Did a few things, up to you to put some data and test it


    Kind regards
    Leo
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-06-2017
    Location
    plymouth
    MS-Off Ver
    2010
    Posts
    2

    Re: Excel Userform Search Command- Listbox displays results

    Hi Leo,

    That's amazing! I love it.

    Just wondering - once you edit an entry, for example, is there a bit of code that can be used to override the initial entry?

    Also, if an entry is deleted, a way for the sheets to erase empty rows?

    Thank you again for the help! It's Brilliant!!

  5. #5
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Excel Userform Search Command- Listbox displays results

    after edit you can use the Buttons Delete or Save Changes


    Cheers
    Leo

+ 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. Excel VBA userform Listbox Search
    By magnum4u in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-24-2017, 06:57 AM
  2. Userform:Search through all ws / show results in Listbox
    By wali in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 01-22-2015, 09:56 PM
  3. [SOLVED] Search and display results to listbox
    By khhoa in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-17-2014, 05:05 AM
  4. Search Engine: Displays results arbitrarily, not alphabetically.
    By MrGorbachenko in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-30-2013, 09:56 PM
  5. [SOLVED] Userform Search to return results in columns in listbox
    By goffa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-16-2013, 09:53 PM
  6. [SOLVED] [Help] I need search results in listbox reversed
    By Compo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-11-2013, 07:22 AM
  7. Search Results displayed in a Listbox
    By Julesdude in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-01-2011, 08:49 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