在GotFocus时快速选择文本
|
51自学网 http://www.wanshiok.com |
Public Sub FocusMe(ctlName As Control) With ctlName .SelStart = 0 .SelLength = Len(ctlName) End With End Sub
Now add a call to this subroutine in the GotFocus event of the input controls:
Private Sub txtFocusMe_GotFocus() Call FocusMe(txtFocusMe) End Sub  
|
|