Quick Text Select On GotFocus
When working with data entry controls, the current value in the control often needs to be selected when the control received focus. This allows the user to immediately begin typing over any previous value. Here注释:s a quick subroutine to do just that:
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
文章来源于领测软件测试网 https://www.ltesting.net/
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:info@testage.com.cn 电话:010-51297073










