Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default highlighting the text of a textbox

I have a form with several textboxes. When the <OK
button is clicked to close the form, a function is called
to verify that all the textboxes contain appropriate
values. If not, a message is displayed and the first
invalid textbox gets the focus.

What I am having difficulty with is that I would like the
text in that textbox to be highlighted as well. Any ideas
would be appreciated...TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default highlighting the text of a textbox

FYI...

Text1.SetFocus
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)


-----Original Message-----
I have a form with several textboxes. When the <OK
button is clicked to close the form, a function is called
to verify that all the textboxes contain appropriate
values. If not, a message is displayed and the first
invalid textbox gets the focus.

What I am having difficulty with is that I would like the
text in that textbox to be highlighted as well. Any

ideas
would be appreciated...TIA
.

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
highlighting text ganga Excel Discussion (Misc queries) 3 June 26th 09 05:51 PM
Highlighting text in a textbox Daniel Bonallack[_2_] Excel Programming 3 December 29th 03 07:08 PM
Highlighting Textbox Garry Jones Excel Programming 1 October 9th 03 06:36 PM
Highlighting or Selecting TextBox entry Gus Gazepis Excel Programming 3 September 8th 03 12:01 AM
check variable(text) with cell (text), textbox Mark[_17_] Excel Programming 1 August 27th 03 01:15 PM


All times are GMT +1. The time now is 07:23 PM.

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

About Us

"It's about Microsoft Excel"