
VB中编写一个成绩判定小程序,但是运行出错,求高人指点.
以下是程序语句,运行后,99分也被判定为E.请高人指点,谢谢.PrivateSubCommand1_Click()DimaAsIntegera=Val(Text1.Tex...
以下是程序语句,运行后,99分也被判定为E.请高人指点,谢谢.
Private Sub Command1_Click()
Dim a As Integer
a = Val(Text1.Text)
Select Case a
Case a >= 90
Text2.Text = "A"
Case a >= 80
Text2.Text = "B"
Case a >= 70
Text2.Text = "C"
Case a >= 60
Text2.Text = "D"
Case Else
Text2.Text = "E"
End Select
End Sub 展开
Private Sub Command1_Click()
Dim a As Integer
a = Val(Text1.Text)
Select Case a
Case a >= 90
Text2.Text = "A"
Case a >= 80
Text2.Text = "B"
Case a >= 70
Text2.Text = "C"
Case a >= 60
Text2.Text = "D"
Case Else
Text2.Text = "E"
End Select
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询