Textbox.SetFocus

  • Thread starter Thread starter Warrio
  • Start date Start date
W

Warrio

Hello!
Is it possible on a form to set the focus on a field without having the hole
filed selected?

cause if I use:

Textbox.SetFocus

, the hole text that contains the textbox is selected!
how can I give the focus to this textbox without having the text select, but
have the cursor at the end of the text?

Thanks for any suggestion
 
use the SelStart and SelLength to control the selection:

Textbox.SetFocus
Textbox.SelStart = 0 'places the cursor
Textbox.SelLength = 0 'sets the selection length

hope this helps
 
EXCELLENT!!!!!!!!!!!!!!!!

merci!!

misha said:
use the SelStart and SelLength to control the selection:

Textbox.SetFocus
Textbox.SelStart = 0 'places the cursor
Textbox.SelLength = 0 'sets the selection length

hope this helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top