输入分数框 = textbox1
显示分数 = label1.text
探测按钮 = Button1
Private Sub button1_click()
If textbox1.text = Int(80~100) Then
label1.text = "Your Rank Is -A-"
ElseIf textbox1.text = Int(60~79) Then
Label1.text = "Your Rank Is -B-"
ElseIf textbox1.text = Int(40~59) Then
Label1.text = "Your Rank Is -C-"
ElseIf textbox1.text = Int(20~39) Then
Label1.text = "Your Rank Is -D-" & vbCrLf & "You didn't pass the exam!"
ElseIf textbox1.text = Int(0~19) Then
Label1.text = "Your Rank Is -E-" & vbCrLf & "Please do more revision!"
ElseIf textbox1.text = "100" Then
Label1.text = "Wow!You get the full marks!"
ElseIf textbox1.text = "0" Then
Label1.text = "Nothing to say..."
ElseIf textbox1.text =>100 Then
Label1.text = "Huh?Marks higher then 100?"
Else
Label1.text = "Only Number Allowed!"
End If
End Sub