+ Reply to Thread
Results 1 to 5 of 5

Change event as you type in textbox

  1. #1
    Registered User
    Join Date
    11-01-2012
    Location
    Aberdeen
    MS-Off Ver
    Excel 2016
    Posts
    60

    Change event as you type in textbox

    Hi all,
    I am making a search box in excel using macros. I defined a cell for entering the search word and a command button which once clicked will color the row where the search word is located. I read that using the change event of a text box, this can be modified in order to be able, as you type in the textbox, to have a coloring of the matching rows in real time.
    I don't actually know how to incorporate that to my original code and replace the command button object with a textbox.
    Any help appreciated.
    Thank you
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,004

    Re: Change event as you type in textbox

    Try this:
    Put the code in the code module of the sheet where the textbox is located.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-01-2012
    Location
    Aberdeen
    MS-Off Ver
    Excel 2016
    Posts
    60

    Re: Change event as you type in textbox

    This worked perfect. I really didn't know whether the change function would produce real time change unless maybe an enter button was pressed. Thank you very much really appreciate your help

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Change event as you type in textbox

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,004

    Re: Change event as you type in textbox

    You're welcome, glad to help, & thanks for the feedback.

+ 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] Trying to return userform after changing source - triggers TextBox Change event
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-09-2017, 10:46 AM
  2. [SOLVED] TextBox change event
    By Dave H9 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-16-2014, 09:24 AM
  3. cant keep typing in userform textbox after change event
    By jed38 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-01-2014, 09:13 AM
  4. [SOLVED] Selection change event on text inside a textbox
    By jlt-uk in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-13-2014, 11:17 AM
  5. [SOLVED] Textbox Change event handler works once
    By Solus Rankin in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-30-2013, 12:28 PM
  6. TextBox Change Event HELP
    By dluhut in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-13-2013, 10:16 AM
  7. Textbox Change event
    By Kerno in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-03-2007, 05:08 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