这个程序运行时出现缺少数组是怎么回事?Private Sub Text1_keypress(KeyAscii As Integer)
PrivateSubText1_keypress(KeyAsciiAsInteger)DimwellnumericAsBoolean,IsNumericAsBoolean...
Private Sub Text1_keypress(KeyAscii As Integer)
Dim wellnumeric As Boolean, IsNumeric As Boolean, n!
n = Val(Text1.Text)
m = Text1.Text
If KeyAscii = 13 Then
If IsNumeric(m) = False Then
Call MsgBox("代码4,不是数字", vbInformation, "提示")
ElseIf wellnumeric(n) = False Then
Call MsgBox("代码3,是数字但不是整数", vbInformation, "提示")
ElseIf n < 10 Then
Call MsgBox("代码2,是小于10的整数", vbInformation, "提示")
ElseIf n > 99 Then
Call MsgBox("代码1,是大于99的整数", vbInformation, "提示")
Else
Call MsgBox("代码0,是两位整数", vbInformation, "提示")
End If
End If
End Sub 展开
Dim wellnumeric As Boolean, IsNumeric As Boolean, n!
n = Val(Text1.Text)
m = Text1.Text
If KeyAscii = 13 Then
If IsNumeric(m) = False Then
Call MsgBox("代码4,不是数字", vbInformation, "提示")
ElseIf wellnumeric(n) = False Then
Call MsgBox("代码3,是数字但不是整数", vbInformation, "提示")
ElseIf n < 10 Then
Call MsgBox("代码2,是小于10的整数", vbInformation, "提示")
ElseIf n > 99 Then
Call MsgBox("代码1,是大于99的整数", vbInformation, "提示")
Else
Call MsgBox("代码0,是两位整数", vbInformation, "提示")
End If
End If
End Sub 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询