>Thanks for your answer Fred, however the problem lies on the SelectOnEntry property. Its default value is .t. and it overrides the SelStart property. I set SelectOnEntry to .f. and it worked.
You can control the position and size of the selected text of a textbox using the .SelStart and .SelLength properties if you set these in the .GotFocus method of the textbox.