Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If your user Tabs into the TextBox, it will automatically select all the
text without you having to do anything; so I presume you are talking about selecting the TextBox using the mouse. If so, try putting the code you posted into the MouseDown event for the TextBox and see if that is the effect you are after. (You could put it in the MouseUp event, and logic would almost dictate that to be the correct event to use; however, the selection method is more instantaneous using the MouseDown event.) Rick "Chrisso" wrote in message ... 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Force save to CURRENT directory | Excel Programming | |||
Getting paragraphs of text into a textbox control | Excel Programming | |||
Legnth of text in textbox control | Excel Discussion (Misc queries) | |||
How to force current directory | Excel Programming | |||
How to move cursor from one textbox control to another textbox con | Excel Programming |