TAB to textbox highlights all the text

M

Marshall Barton

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.
 
M

Marshall Barton

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
 
Top