+ Reply to Thread
Results 1 to 4 of 4

CommandButton to return to TextBox

  1. #1
    Forum Contributor
    Join Date
    10-03-2016
    Location
    Sydney, Australia
    MS-Off Ver
    MS 365
    Posts
    128

    CommandButton to return to TextBox

    Hi there,

    I have a TextBox on a spreadsheet which is used to search for items. I also have a commandbutton that will "Clear" whats in the textbox so you don't have to manually delete every character.

    Currently, when you click the "Clear" button, the textbox clears but then you have to click on it again to begin typing. Is there something I can add into the following (very simple) code so that when you click on "Clear", the cursor automatically returns to the textbox and you can begin typing again?

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: CommandButton to return to TextBox

    Hello Anarchus,

    Try;

    Please Login or Register  to view this content.
    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Contributor
    Join Date
    10-03-2016
    Location
    Sydney, Australia
    MS-Off Ver
    MS 365
    Posts
    128

    Re: CommandButton to return to TextBox

    Hi Winon,

    I didn't know it was that simple. Thanks so much!

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: CommandButton to return to TextBox

    You are welcome Anarchus, glad I could help.

    Thank you for marking the Thread as Solved!

    Regards.

+ 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] How to use CommandButton instead of TextBox on Chart?
    By HerryMarkowitz in forum Excel Charting & Pivots
    Replies: 14
    Last Post: 08-24-2015, 04:17 AM
  2. [SOLVED] value for textbox goes to commandbutton
    By aimjhun in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-09-2013, 09:54 PM
  3. Add Sheet with a CommandButton & TextBox
    By zplugger in forum Excel General
    Replies: 0
    Last Post: 01-18-2013, 09:52 AM
  4. Listbox to textbox via commandbutton
    By himanshu83 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-14-2010, 03:14 PM
  5. Link commandbutton to textbox
    By ncaravela in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-22-2010, 12:51 PM
  6. VBA TextBox determines CommandButton??
    By newty in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-17-2010, 03:41 PM
  7. Userform question re: textbox/commandbutton
    By djvice in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-05-2007, 10:40 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