Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Highlight all Text in a Textbox when the textbox is selected


I must be missing something, but when I select the text box I want al
of the information in the text box selected automatically so that I ca
just start entering information and the original text is deleted.
Please help

--
RPIJ
-----------------------------------------------------------------------
RPIJG's Profile: http://www.excelforum.com/member.php...nfo&userid=928
View this thread: http://www.excelforum.com/showthread.php?threadid=48018

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Highlight all Text in a Textbox when the textbox is selected

What kind of text box. Where is it located? Are you asking how to program
something or just wishing?

--
Regards,
Tom Ogilvy



"RPIJG" wrote in
message ...

I must be missing something, but when I select the text box I want all
of the information in the text box selected automatically so that I can
just start entering information and the original text is deleted.
Please help.


--
RPIJG
------------------------------------------------------------------------
RPIJG's Profile:

http://www.excelforum.com/member.php...fo&userid=9285
View this thread: http://www.excelforum.com/showthread...hreadid=480188



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Highlight all Text in a Textbox when the textbox is selected


Hello RPIJG,

If you want to highlight the text inside a TextBox on a user form whe
the user clicks the TextBox, this code will do that.

Inset this code into the Mouse_Up Event for the TextBox. Chang
TextBox1 in the Example to match the name of your TextBox.


Code
-------------------
Private Sub TextBox1_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)

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

End Sub

-------------------


Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=48018

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Highlight all Text in a Textbox when the textbox is selected


Sorry Tom I guess it was a bit of both, a wish and a need to program
Leith that works great thanks

--
RPIJ
-----------------------------------------------------------------------
RPIJG's Profile: http://www.excelforum.com/member.php...nfo&userid=928
View this thread: http://www.excelforum.com/showthread.php?threadid=48018

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
HELP! I Lost The Ability To Advance From TextBox To TextBox With the ENTER Or The TAB Keys Minitman[_4_] Excel Programming 0 February 22nd 05 08:50 PM
Textbox Bug? Missing/delayed update of textbox filled via VBA MarcM Excel Programming 0 November 4th 04 05:47 PM
Textbox Bug? Missing/delayed update of textbox filled via VBA MarcM Excel Programming 0 November 4th 04 05:43 PM
How to move cursor from one textbox control to another textbox con Tom Ogilvy Excel Programming 1 September 16th 04 03:42 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


All times are GMT +1. The time now is 09:11 PM.

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"