Text box control. 
Author Message
 Text box control.

Hi,
      I want that when I enter in a text box the text inside it should
get selected automatically.

Could anyone help.

Regards

Abhi



Mon, 08 Dec 2003 13:22:08 GMT  
 Text box control.
Private Sub Text1_GotFocus()
  With Text1
    .SelStart = 0
    .SelLength = Len(.Text)
  End With
End Sub


Quote:
> Hi,
>       I want that when I enter in a text box the text inside it should
> get selected automatically.

> Could anyone help.

> Regards

> Abhi



Mon, 08 Dec 2003 13:51:33 GMT  
 Text box control.

Quote:

> Hi,
>       I want that when I enter in a text box the text inside it should
> get selected automatically.

> Could anyone help.

> Regards

With Text1
  .SelStart = 0
  .SelLength = Len(.Text)
End With

LFS



Tue, 09 Dec 2003 13:34:54 GMT  
 Text box control.
Heres an example:

Private Sub Text1_GotFocus()
    Text1.SelStart = 0
    Text1.SelLength = Len(Text1.Text)
End Sub

Jared


Quote:
> Hi,
>       I want that when I enter in a text box the text inside it should
> get selected automatically.

> Could anyone help.

> Regards

> Abhi



Sat, 20 Dec 2003 09:03:56 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Rich Text Box or text box control

2. formatting rows and columns in unbound data control, rich text box control, or listbox control

3. newbie Q: text box control on a custom dialog box form

4. Text box control: storing a large amounf of text

5. Saving Rich Text Box Control as PLAIN TEXT!!!!

6. Formatting Lines of Text in a Rich Text Box Control

7. Help with text box control as an text file editor

8. Text Box Controls

9. Starting a new line in text box control

10. Rich Text Box Control

11. Looping through text box controls on a large form programmatically

12. Setting a text box control gives error 2115

 

 
Powered by phpBB® Forum Software