7,786
社区成员
发帖
与我相关
我的任务
分享
Private Sub Text1_Change()
If Asc(InStr(1, Text1.Text) = 97) Then
If (MsgBox("输入错误!", vbOKOnly) = vbOK) Then
Text1.SelStart = 0
Text1.SelLength = Text1.Width
Text1.SetFocus
End If
End If
End Sub

Private Sub Text1_Change()
If InStr(1, Text1.Text, "a") > 0 Then
MsgBox ("输入无效,请重新输入!")
Text1.Text = ""
End If
End SubOption Explicit
Private Sub Form_Load()
Text1.Text = ""
End Sub
Private Sub Text1_Change()
If InStr(1, Text1.Text, "a") > 0 Then MsgBox ("输入无效,请重新输入!")
Text1.Text = ""
End Sub