简单的VB编程题问题(在线等)

2024年11月14日 14:29
有2个网友回答
网友(1):

Private Sub Command1_Click()
Select Case text1.Text
Case Is < 60
label1.Caption = "不及格"
Case Is <= 75
label1.Caption = "及格"
Case Is <= 85
label1.Caption = "良好"
Case Is <= 100
label1.Caption = "优秀"
Case Else
label1.Caption = "输入成绩错误"
End Select
End Sub

网友(2):

Private Sub Command1_Click()
Dim i As Integer
i = Me.Text1.Text
Select Case i
Case Is < 60
Me.Label1.Caption = "不及格"
Case Is <= 75
Me.Label1.Caption = "及格"
Case Is <= 85
Me.Label1.Caption = "良好"
Case Is <= 100
Me.Label1.Caption = "优秀"
End Select
End Sub