TAB to textbox highlights all the text

  • Thread starter Thread starter Guest
  • Start date Start date
mscertified said:
How can I prevent tabbing to a textbox from highlighting all the text?


Use Tools - Options - Keyboard to set how you want the
cursor to behave when entering a text box.
 
Use the control's Enter event.

If you want the cursor at the start of the value:
Me.textbox.SelStart = 1
Me.textbox.SelLength = 0

If you want is at the end:
Me.textbox.SelStart = Len(Me.textbox)
Me.textbox.SelLength = 0
 
Back
Top