+ Reply to Thread
Results 1 to 5 of 5

Find/Search within Userform Textboxes

  1. #1
    Forum Contributor
    Join Date
    05-23-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2013
    Posts
    259

    Find/Search within Userform Textboxes

    Hi Everyone,

    Does anyone know of macro code to add a search box to a userform? I have a userform with a lot of textboxes that pull their values from my sheet. I'm hoping to add a search feature so that an individual can type a keyword or just part of a word and jump to the relevant textbox.

    Even if it has to be a separate userform that is called from a button that would be fine.

    Any thoughts, direction, assistance is greatly appreciated.

    Thank you!

    -LM

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Find/Search within Userform Textboxes

    One option, make a button on the userform and put the following code in it:

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Contributor
    Join Date
    05-23-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2013
    Posts
    259

    Re: Find/Search within Userform Textboxes

    Hi Arkadi,

    Firstly thank you so much for your quick response!

    I have attempted to implement and this is my result:

    1) The search box comes up just fine, but the search success is sporadic. It finds numbers flawlessly, but combinations of letters (either full or partial words) are very hit or miss. For most it gives the "Text not Found" message box, but others it chooses a weird order. For instance, I search "clin" knowing that in the second textbox, the word "clinic" is present. It instead jumped much further down to a textbox with the word "recycling."

    2) Is there a way to allow the user to also hit next in case there are multiple matches for their search to cycle through them? Where perhaps the search box doesn't close until they hit the exit button?

    Thanks again!

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Find/Search within Userform Textboxes

    Yes the search order could be fairly random i suppose... At best it would be the order they were created in. Let me give it some thought... Next button is pretty easy, but I may have a more elegant solution.

  5. #5
    Forum Contributor
    Join Date
    05-23-2013
    Location
    Ohio
    MS-Off Ver
    Excel 2013
    Posts
    259

    Re: Find/Search within Userform Textboxes

    Hi Arkadi,

    Just wanted to check back in to see if you had any thoughts on adding the "next" button. Tried searching myself a bit online once I knew about the "inputbox" from your code, but have not had luck.

    Thanks again for the help you've provided so far!

+ 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. Want Average on userform textboxes to ignore blank textboxes
    By cvanderweide92177 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-10-2018, 12:47 PM
  2. Userform; search/match two textboxes and then update that row
    By ckaten in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-30-2018, 09:48 AM
  3. VBA Userform Multiple Textboxes to Find Record
    By chamowllie01 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-07-2016, 10:06 AM
  4. [SOLVED] Search, find, match-populate textboxes
    By john55 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-04-2015, 02:36 AM
  5. [SOLVED] Can't find textboxes in userform!
    By karmadog62 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-20-2014, 04:29 PM
  6. Search worksheet for data in multiple textboxes in userform and display in another workshe
    By SierraKilo78 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-23-2013, 09:59 AM
  7. Userform populate listbox with search from multiple textboxes
    By chendysworld in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-12-2012, 11:12 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