Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Highlight text in textboxes

Hi all,

A simple question: How can I programmatcially highlight text in a textbox?
Textbox.SetFocus doesn't work. Thanks for your advcie in advance.

Frederick Chow


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Highlight text in textboxes

With TextBox1
.SelStart = 1
.SelLength = Len(.Text)
.SetFocus
End With

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Frederick Chow" wrote in message
...
Hi all,

A simple question: How can I programmatcially highlight text in a textbox?
Textbox.SetFocus doesn't work. Thanks for your advcie in advance.

Frederick Chow




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Thank you very much (N/C)


"Bob Phillips" wrote in message
...
With TextBox1
.SelStart = 1
.SelLength = Len(.Text)
.SetFocus
End With

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Frederick Chow" wrote in message
...
Hi all,

A simple question: How can I programmatcially highlight text in a
textbox?
Textbox.SetFocus doesn't work. Thanks for your advcie in advance.

Frederick Chow






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
Text wrap problem when printing labels/textboxes chipshot Excel Discussion (Misc queries) 1 September 30th 05 10:21 PM
Clearing text in TextBoxes CG Rosén Excel Programming 3 August 18th 05 10:01 PM
Default text in textboxes MissGenie Excel Discussion (Misc queries) 1 June 7th 05 01:22 PM
Highlight / "Selection" of AutoShape Text (Like SelStart for TextBoxes) James Cox[_2_] Excel Programming 0 May 18th 05 06:05 PM
Text length and TextBoxes Ron_D[_2_] Excel Programming 4 December 28th 04 09:47 AM


All times are GMT +1. The time now is 04:15 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"