+ Reply to Thread
Results 1 to 2 of 2

Searching for values using textbook in userform and populating spreadsheet with the row

  1. #1
    Registered User
    Join Date
    06-29-2015
    Location
    Buenos Aires, Argentina
    MS-Off Ver
    Microsoft Office 2013
    Posts
    4

    Searching for values using textbook in userform and populating spreadsheet with the row

    hello guys, I am in a bind here at work. I'm not very good at using VBA macros and have been assigned a project that deals with searching through various spreadsheets using userform that has textboxes and checkboxes. What I am trying to do is type a value in textbox1, for example, and it searches the sheet for that value in column 1 and only populates the sheet with rows that have the value I typed in the textbox1. If that value doesn't exist or is wrong, i want it to say no match found. Same goes for the next textbook, which will actually be looking through a different column within the spreadsheet but once the textbook value matches the ones on the spreadsheet, i want it to populate it with those rows that have that value. I have the command buttons down (search, cancel, etc), the part i am stumped on is the textbox. The code I have is as follows below for the first textbox, but it does not work fully. Also, how would I continue the code with the second texbox search function without it interfering with the first?

    'Private Sub CommandButtonOk_Click()



    Please Login or Register  to view this content.
    Last edited by jamildeen; 06-30-2015 at 08:13 AM.

  2. #2
    Forum Contributor Gregor y's Avatar
    Join Date
    10-24-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2010 32-Bit
    Posts
    280

    Re: Searching for values using textbook in userform and populating spreadsheet with the ro

    If you select your data table go to the "DATA" ribbon and click on the giant funnel button that says Filter, you'll get drop down's on your columns that do basicly the same functionality that you're describing here. You may want to give that a try first to see if it suits your needs before you put a ton of work into reinventing it.

+ 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. Populating values in userform from hidden columns
    By vermeulj in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2015, 03:34 AM
  2. [SOLVED] How can I add Hyperlink for Thisworkbook.Worksheet with userform textbook
    By sanjaypalsjp in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-06-2015, 09:38 AM
  3. [SOLVED] populating spreadsheet from userform
    By 10121730 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-13-2012, 03:24 PM
  4. Need help searching worksheet for userform textbox values
    By bsweet0us in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-16-2011, 10:57 AM
  5. Seeking Input through userform and searching the spreadsheet for corresponding entry
    By himanshu83 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-14-2010, 02:14 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