判断输入数字"."前面的数字长度就可以了啊 dim str1 as string '设输入数字为str1 split(str1,".",-1,1) len(split(0))必须小于2 否则错误
看看这个能不能帮你 Private Sub Command1_Click() Dim a() As String a = Split(Text1.Text, ".") If Val(a(0)) > 99 Then MsgBox "erro", vbOKOnly, "错误提示" End If End Sub
dim str1 as string '设输入数字为str1
split(str1,".",-1,1)
len(split(0))必须小于2 否则错误
Private Sub Command1_Click()
Dim a() As String
a = Split(Text1.Text, ".")
If Val(a(0)) > 99 Then
MsgBox "erro", vbOKOnly, "错误提示"
End If
End Sub