How to go automatically to the beginning?

DrMaestro

Registered User.
Local time
Tomorrow, 00:06
Joined
Feb 3, 2007
Messages
21
Hi,

I have a date field and a phone field with input masks. What I want to achieve is when someone clicks the fields, I want the cursor to go to the beginning (the leftmost) of the field. Actually, when you click a field, the cursor appears just at the spot you clicked, which can be the middle of the field, so you have to press the left arrow to go to he beginning and start typing. This is annoying, because it diverts the users attention. Any solutions?

Thanks
 
Try:
Private Sub YourTextBox_Click()
Me.YourTextBox.SelStart = 0
End Sub
 
Hi MicroE,

I tried your solution and it works just as I wanted. Thank you very much....:)
 

Users who are viewing this thread

Back
Top Bottom