永发信息网

vb成绩转等级 90以上优秀.80以上良好.70以上中等.60以上及格.60以下不及格

答案:2  悬赏:20  手机版
解决时间 2021-03-07 14:42
  • 提问者网友:人傍凄凉立暮秋
  • 2021-03-07 00:41
vb成绩转等级 90以上优秀.80以上良好.70以上中等.60以上及格.60以下不及格
最佳答案
  • 五星知识达人网友:时间的尘埃
  • 2021-03-07 01:42
Private Sub Command1_Click()
On Error Resume Next
If Text1.Text < 0 Or Text1.Text > 100 Or Not IsNumeric(Text1.Text) Then Exit Sub
Select Case Text1.Text
Case Is >= 90
Text2.Text = "优秀"
Case Is >= 80
Text2.Text = "良好"
Case Is >= 70
Text2.Text = "中等"
Case Is >= 60
Text2.Text = "及格"
Case Is < 60
Text2.Text = "不及格"
End Select
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
End Sub
全部回答
  • 1楼网友:英雄的欲望
  • 2021-03-07 03:03
Private Sub Command1_Click()
dim a as string
dim b as string
a=label1
if (a>=90) then
b="优秀"
elseif (a>=80) then
b="良好"
elseif (a>=70) then
b="中等"
elseif (a>=60) then
b="及格"
else
b="不及格"
end if
label2=b
End Sub
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯