In order to highlight text in a TextBox (other than Tabbing into that field), you can insert a couple helpful snippets of VBA  code that will help you accomplish this easily!

The first line tells VBA to put the cursor at the leftmost (0) character:

Me.TextBox1.SelStart = 0

The next line tells it to select the length of whatever the length of characters you have in that textbox:

Me.TextBox1.SelLength = Len(Me.TextBox1)


Pretty simple, right!?

Check out this video to see more details, including how to apply this to a button or even when the userform opens!


Forgot Password?

Join Us

Discover the Secrets of Excel Your Coworkers Don't Want You To Know and Your Boss Will Love You For...

Free video training will be sent to your email

You have Successfully Subscribed!

    Your Cart
    Your cart is emptyReturn to Shop