- Dim var
- Do
- var=InputBox("输入分数0-100:")
- Loop Until IsNumeric(var) '判断是否为数字
- Select Case True
- Case var>=0 And var<=20 : MsgBox "e等"
- Case var>20 And var<=40 : MsgBox "d等"
- Case var>40 And var<=60 : MsgBox "c等"
- Case var>60 And var<=80 : MsgBox "b等"
- Case var>80 And var<=100 : MsgBox "a等"
- Case Else MsgBox "输入有误!"
- End Select
复制代码
|