6,216
社区成员




Private Sub TextBox1_LostFocus()
Dim step As Integer
Dim say As Boolean
For step = 1 To Len(TextBox1.Text)
If (InStr("0123456789", Mid(TextBox1.Text, step, 1)) = 0) Then
say = True
End If
Next
If (say) Then
MsgBox ("请输入纯数字")
TextBox1.Text = ""
End If
End Sub
private sub TextBox1_LostFocus()
If IsNumeric(TextBox1.Text)=False Then
MsgBox(“请输入数字”)
TextBox1.Text=””
TextBox1.SetFocus
End IF
End sub