Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Textbox question

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Textbox question

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)


"Jorge Rodrigues" wrote in message
...
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Textbox question

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
"Bob Phillips" escreveu na mensagem
...
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)


"Jorge Rodrigues" wrote in message
...
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






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Textbox question

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)


"Jorge Rodrigues" wrote in message
...
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
"Bob Phillips" escreveu na mensagem
...
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)


"Jorge Rodrigues" wrote in message
...
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








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Textbox question

Thanks Bob
Jorge
"Bob Phillips" escreveu na mensagem
...
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)


"Jorge Rodrigues" wrote in message
...
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
"Bob Phillips" escreveu na mensagem
...
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)


"Jorge Rodrigues" wrote in message
...
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










Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
TextBox Question Jim Excel Discussion (Misc queries) 4 July 11th 08 10:41 PM
Textbox question browie Excel Discussion (Misc queries) 0 June 13th 05 04:00 PM
Textbox question? Greg B Excel Discussion (Misc queries) 2 June 2nd 05 03:56 PM
textbox question dok112[_22_] Excel Programming 1 August 10th 04 07:54 AM
Textbox question 2 Rich Cooper Excel Programming 5 June 14th 04 08:51 PM


All times are GMT +1. The time now is 03:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"