Textbox question

  • Thread starter Thread starter Jorge Rodrigues
  • Start date Start date
J

Jorge Rodrigues

Hi, guys
I have a textbox and what I want is, when is set focused, hilight all the
word/number, in order to override the old one by the new. As far as I saw,
the cursor only goes next to the last digit, don't hilight all the
number/word.
TIA
Jorge
 
Jorge,

Try something like

Private Sub TextBox1_Enter()
With TextBox1
.SelLength = Len(.Text)
.SelStart = 0
End With
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Hi, Bob
As I understood, the focus now, with your exemple, goes to the beginning.
Ok, but what I really want is hilight all the word/number, from the
beggining to the end. Can you help me once more time?
Thanks and Regards.
Jorge
 
Jorge,

That should do just that, the
..SelLength = Len(.Text)
sets the whole text length


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Thanks Bob
Jorge
Bob Phillips said:
Jorge,

That should do just that, the
.SelLength = Len(.Text)
sets the whole text length


--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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