If Text4.Text >= "2%" Or Text8 >= "2%" Or Text12 >= "2%" Or Text16 >= "2%" Or Text20 >= "2%" Then
Text51.Text = "不合格"
Else
Text51.Text = "合格"
End If
超过9%就不对了。10%显示是合格。请问是怎么回事?没有%就正常
Private Sub Command1_Click()
s = Text1.Text
nums = Left(s, Len(s) - 1)
If Right(s, 1) = "%" And IsNumeric(nums) Then
V = Val(nums)
End If
MsgBox V * 2
End Sub
Private Sub Command7_Click()
Call Command1_Click
Call Command2_Click
Call Command3_Click
Call Command4_Click
Call Command5_Click
Call Command6_Click
a = Text4.Text
b = Text8.Text
c = Text12.Text
d = Text16.Text
e = Text20.Text
If a >= "2%" And b >= "2%" And c >= "2%" And d >= "2%" And e >= "2%" Then
Text51.Text = "不合格"
Else
Text51.Text = "合格"
End If
If Text24 >= "4%" Then
Text52.Text = "不合格"
Else
Text52.Text = "合格"
End If
End Sub
还是一样有问题超过10%判断就不对了