+ Reply to Thread
Results 1 to 3 of 3

userform how to set focus on textbox1 when click "AB" button.

  1. #1
    Registered User
    Join Date
    08-12-2018
    Location
    Taiwan
    MS-Off Ver
    MS 16
    Posts
    17

    userform how to set focus on textbox1 when click "AB" button.

    hi all,

    i am using keypress function to set when run the userform and i press "AB" button i will setfocus to textbox1,but it seen like not working.

    have anyway to modify this?

    Please Login or Register  to view this content.

    Thanks and Regards,
    KINDER.

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,351

    Re: userform how to set focus on textbox1 when click "AB" button.

    Like this.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Registered User
    Join Date
    08-12-2018
    Location
    Taiwan
    MS-Off Ver
    MS 16
    Posts
    17

    Re: userform how to set focus on textbox1 when click "AB" button.

    but it still face some error, or did you have any idea to set hot key to focus the textbox,like when I run userform and I press "AB" it will go the textbox1.


    Thanks!

+ 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. Disable excel's "Close" button (red X) in workbook for more than 1 click
    By Skhotheni in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-29-2018, 07:23 PM
  2. Load New Picture with a click of the "Command Click()" button
    By Brainwave in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2016, 01:49 PM
  3. [SOLVED] UserForm Textbox1 IF "" then Enable
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-19-2013, 03:33 PM
  4. EXCEL: File Doesn't Close With Click On Top Right "x" Button
    By gaikwad.mm@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2013, 04:29 AM
  5. Toggle BackColor of labels in Userform through "click" and "double-click"
    By ahmerjaved in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-20-2013, 02:08 PM
  6. Difference between manual "click" of activeX checkbox and coded "click"
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-23-2012, 10:51 AM
  7. Replies: 1
    Last Post: 05-13-2008, 01:36 AM

Tags for this Thread

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