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