LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default How to force selection of all current text in textbox control onentry?

Hi All

I have a text box on a form. When the user selects the text box it is
*always* to completely change the value. Therefore I would like to
program an event that selects all the current text in the text box
when the user selects it - that way they are ready immediately to
begin typing the new value.

Hoever I cannot get this to work:

Private Sub txtCanvasSizeWidth_Enter()
Me.txtCanvasSizeWidth.SelStart = 0
Me.txtCanvasSizeWidth.SelLength = Len(Me.txtCanvasSizeWidth)
End Sub

Can anyone help? Thanks in advance for any ideas?

Chrisso
 
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
Force save to CURRENT directory CLR Excel Programming 5 October 26th 07 03:10 PM
Getting paragraphs of text into a textbox control Gordon[_2_] Excel Programming 5 August 19th 05 08:47 AM
Legnth of text in textbox control rgarber50 Excel Discussion (Misc queries) 3 July 15th 05 02:18 PM
How to force current directory CLR Excel Programming 8 November 30th 04 01:11 AM
How to move cursor from one textbox control to another textbox con Tom Ogilvy Excel Programming 1 September 16th 04 03:42 PM


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