+ Reply to Thread
Results 1 to 7 of 7

Search and display results to listbox

  1. #1
    Registered User
    Join Date
    11-07-2014
    Location
    California
    MS-Off Ver
    2010
    Posts
    54

    Search and display results to listbox

    Hello,

    I have a userform1 that allows users to search :

    Data on sheet2

    and results on sheet1
    userform1.PNGData.PNGResults.PNG


    End user inputs 142 and search, this should display results in listbox that have all matching title : 142. with the total of 7 columns

    The end user would be able to select the correct one and add the results with a click of a button to sheet1 for print.

    Curently my code consist of msgbox but the clicking is not helpful.

    Please Login or Register  to view this content.
    Last edited by khhoa; 11-12-2014 at 09:15 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Search and display results to listbox

    This is fundamentally wrong.

    You need a search routine to find your matching entries

    Once found the entries are used to populate a list box

    Clicking on the listbox should then pull up the selected data.

    study this userform:-
    Attached Files Attached Files
    Last edited by mehmetcik; 11-07-2014 at 08:17 PM.

  3. #3
    Registered User
    Join Date
    11-07-2014
    Location
    California
    MS-Off Ver
    2010
    Posts
    54

    Re: Search and display results to listbox

    in the userform1 what does the textbox2 and textbox3 functions?

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Search and display results to listbox

    you can type additional words etc in those to reduce the matches in the list box

    Try dal in box 1 and r in box 2 or 3

  5. #5
    Registered User
    Join Date
    11-07-2014
    Location
    California
    MS-Off Ver
    2010
    Posts
    54

    Re: Search and display results to listbox

    Thanks mehmetcik for the attached file, I will start working on it right away. Will get back to you with any issues or better, having it completed.

  6. #6
    Registered User
    Join Date
    11-07-2014
    Location
    California
    MS-Off Ver
    2010
    Posts
    54

    Re: Search and display results to listbox

    What is the purpose of this part of the code?

    Please Login or Register  to view this content.
    I am getting a Run-Time error '9':
    Subscript out of range

    shows highlighted
    Please Login or Register  to view this content.

    Current Code:

    Issues:
    1. listbox additem is adding like a text, I need to have columns and set the first column rows with a better understanding for end user
    Title, Company,Lastname, Address, City, State, Zipcode with a auto adjust column size if possible?

    2. output when data is select from listbox needs to be only on column B8,B9,B10, B11 not being added list a list when selected again.

    Please Login or Register  to view this content.
    Last edited by khhoa; 11-10-2014 at 03:19 PM. Reason: additional issues

  7. #7
    Registered User
    Join Date
    07-16-2014
    Location
    England
    MS-Off Ver
    2010
    Posts
    54

    Re: Search and display results to listbox

    found this thread interesting and after tying to understand the example i'm a bit lost, is there a way which you can search over multiple worksheets?

+ 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] displaying text box search results in a listbox
    By Nitefox in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-29-2014, 08:38 PM
  2. [SOLVED] Display search results inluding results that match patrially
    By RichTea88 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-06-2013, 08:52 AM
  3. [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
  4. Textbox search and display results in listbox
    By AirBrun in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 08-02-2012, 01:22 PM
  5. 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