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 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%判断就不对了
我把判断条件反过来写好是正常了
不知对不对
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 = "合格"
Else
Text51 = "不合格"
End If
If Text24 <= "4%" Then
Text52 = "合格"
Else
Text52 = "不合格"
End If
If a <= "10%" And b <= "10%" And c <= "10%" And d <= "10%" And e <= "10%" Then
Text51 = "合格"
Else
Text51 = "不合格"
End If
If Text24 <= "10%" Then
Text52 = "合格"
Else
Text52 = "不合格"
End If