📄 thisdocument.cls
字号:
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "ThisDocument"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Private Sub CommandButton1_Click()
Label1.Caption = ""
wdnumber = 0
tempnumber = 0
wderror = "1."
'初始化变量
If CheckBox1a.Value = False And CheckBox1b.Value = False And CheckBox1c.Value = False And CheckBox1d.Value = True Then
wdnumber = wdnumber + 5
End If
'判断1题计分
If CheckBox2a.Value = False And CheckBox2b.Value = False And CheckBox2c.Value = False And CheckBox2d.Value = True Then
wdnumber = wdnumber + 5
End If
'判断2题计分
If CheckBox3a.Value = True And CheckBox3b.Value = False And CheckBox3c.Value = False And CheckBox3d.Value = False Then
wdnumber = wdnumber + 5
End If
'判断3题计分
If CheckBox4a.Value = True And CheckBox4b.Value = False And CheckBox4c.Value = False And CheckBox4d.Value = False Then
wdnumber = wdnumber + 5
End If
'判断4题计分
If CheckBox5a.Value = False And CheckBox5b.Value = True And CheckBox5c.Value = False And CheckBox5d.Value = False Then
wdnumber = wdnumber + 5
End If
'判断5题计分
If CheckBox6a.Value = True And CheckBox6b.Value = False And CheckBox6c.Value = False And CheckBox6d.Value = False Then
wdnumber = wdnumber + 5
End If
'判断6题计分
If CheckBox7a.Value = False And CheckBox7b.Value = False And CheckBox7c.Value = False And CheckBox7d.Value = True Then
wdnumber = wdnumber + 5
End If
'判断7题计分
If CheckBox8a.Value = True And CheckBox8b.Value = False And CheckBox8c.Value = False And CheckBox8d.Value = False Then
wdnumber = wdnumber + 5
End If
'判断8题计分
If CheckBox9a.Value = False And CheckBox9b.Value = True And CheckBox9c.Value = False And CheckBox9d.Value = False Then
wdnumber = wdnumber + 5
End If
'判断9题计分
If CheckBox10a.Value = False And CheckBox10b.Value = False And CheckBox10c.Value = False And CheckBox10d.Value = True Then
wdnumber = wdnumber + 5
End If
'判断10题计分
If CheckBox11a.Value = False And CheckBox11b.Value = False And CheckBox11c.Value = False And CheckBox11d.Value = True Then
wdnumber = wdnumber + 5
End If
'判断11题计分
If CheckBox12a.Value = False And CheckBox12b.Value = False And CheckBox12c.Value = True And CheckBox12d.Value = False Then
wdnumber = wdnumber + 5
End If
'判断12题计分
If CheckBox13a.Value = True And CheckBox13b.Value = False And CheckBox13c.Value = False And CheckBox13d.Value = False Then
wdnumber = wdnumber + 5
End If
'判断13题计分
If CheckBox14a.Value = True And CheckBox14b.Value = False And CheckBox14c.Value = False And CheckBox14d.Value = False Then
wdnumber = wdnumber + 5
End If
'判断14题计分
If CheckBox15a.Value = False And CheckBox15b.Value = False And CheckBox15c.Value = False And CheckBox15d.Value = True Then
wdnumber = wdnumber + 5
End If
'判断15题计分
If CheckBox16a.Value = True And CheckBox16b.Value = False And CheckBox16c.Value = False And CheckBox16d.Value = False Then
wdnumber = wdnumber + 5
End If
'判断16题计分
If CheckBox17a.Value = False And CheckBox17b.Value = False And CheckBox17c.Value = False And CheckBox17d.Value = True Then
wdnumber = wdnumber + 5
End If
'判断17题计分
If CheckBox18a.Value = False And CheckBox18b.Value = False And CheckBox18c.Value = True And CheckBox18d.Value = False Then
wdnumber = wdnumber + 5
End If
'判断18题计分
If CheckBox19a.Value = False And CheckBox19b.Value = True And CheckBox19c.Value = False And CheckBox19d.Value = False Then
wdnumber = wdnumber + 5
End If
'判断19题计分
If CheckBox20a.Value = True And CheckBox20b.Value = False And CheckBox20c.Value = False And CheckBox20d.Value = False Then
wdnumber = wdnumber + 5
End If
'判断20题计分
Label1.Caption = "你本次得分:" + Str$(wdnumber) + "分。"
'利用标签控件显示评价内容和成绩
If wdnumber < 60 Then
Label2.Caption = "抱歉你本次考试未过关,还需加强学习!"
Else
If wdnumber >= 60 And wdnumber < 75 Then
Label2.Caption = "恭喜你本次考试过关,等级为:合格"
Else
If wdnumber >= 75 And wdnumber < 85 Then
Label2.Caption = "恭喜你本次考试过关,等级为:良好"
Else
If wdnumber >= 85 Then
Label2.Caption = "恭喜你本次考试过关,等级为:优秀"
End If
End If
End If
End If
End Sub
'显示考试等级
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -