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
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