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
- 还没有人评论,欢迎说说您的想法!