+ Reply to Thread
Results 1 to 7 of 7

Search sheet and display results

  1. #1
    Forum Contributor
    Join Date
    06-18-2008
    Posts
    121

    Search sheet and display results

    Hi all, hope everyone's well.

    I've got a worksheet I need help with. Its a list of companies in column A, and their address etc in column B.

    I have added a search button and inputbox by "borrowing" it from another sheet I found, but I cant get it to work properly. I'm not very good with VBA to be honest, I only know some basic things.

    I've attached the sheet so hopefully someone will have some ideas! I want to input the name of a company, then bring up the details for all the matching companies. I'm not 100% sure what I want it to look like etc, as long as it does the job that's fine.

    Thanks a lot,

    Tony
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,607
    Here's one approach, which puts the results on sheet2.
    Please Login or Register  to view this content.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,270
    I like Stephen's approach. I added the following line after "End With" to modify the sheet2 name
    Please Login or Register  to view this content.
    ChemistB
    My 2

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Contributor
    Join Date
    06-18-2008
    Posts
    121
    Guys your all legend! Worked a treat

  5. #5
    Forum Contributor
    Join Date
    06-18-2008
    Posts
    121
    Sorry guys, one last thing.

    If I click the Cancel button, I get the debug box. I've inserted a line of code that fixes this and just closes the box, however, sheet 2 no longer changes name?

    This is what I've done:

    Please Login or Register  to view this content.
    Any ideas?

  6. #6
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,607
    Do you mean you want sheet2 to revert to "Sheet2"? If so, try this:
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    06-18-2008
    Posts
    121
    Problem solved! Thanks for all your help mate

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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