'有一个事件,名字叫Text1_LostFocus,相关语句为'取得焦点控件的名称
Dim ctl As Control
Set ctl = Screen.ActiveControl
Print "当前得到焦点的是:" & ctl.Name'可以以此来判断if ctl.Nametext1 then MsgBo...
Private Sub Form_Load()
txtText1.MaxLength = 6End SubPrivate Sub txtText1_Change()
If Not IsNumeric(txtText1.Text) And txtText1.Text"" Then
MsgBox "请输入正确...