7.填充題

填充題與多選題的程式碼相同,以下略

Dim sno, pwr As Integer

Dim ermsg As String

Private Sub CommandButton1_Click()

If tea = 1 Then

If Slide2.modify <> True Then Label1 = itmno

CommandButton1.Caption = Slide2.submit.Caption

If anset = 1 Then

a1 = s1

a2 = s2

a3 = s3

a4 = s4

a5 = s5

a6 = s6

a7 = s7

a8 = s8

a9 = s9

aa = sa

If s1 <> "" Then ermsg = ermsg & " " & s1

If s2 <> "" Then ermsg = ermsg & " " & s2

If s3 <> "" Then ermsg = ermsg & " " & s3

If s4 <> "" Then ermsg = ermsg & " " & s4

If s5 <> "" Then ermsg = ermsg & " " & s5

If s6 <> "" Then ermsg = ermsg & " " & s6

If s7 <> "" Then ermsg = ermsg & " " & s7

If s8 <> "" Then ermsg = ermsg & " " & s8

If s9 <> "" Then ermsg = ermsg & " " & s9

If sa <> "" Then ermsg = ermsg & " " & sa

MsgBox seta & ermsg

Else

End If

nex

s1 = ""

s2 = ""

s3 = ""

s4 = ""

s5 = ""

s6 = ""

s7 = ""

s8 = ""

s9 = ""

sa = ""

s1.BackColor = &HFFFFFF

s2.BackColor = &HFFFFFF

s3.BackColor = &HFFFFFF

s4.BackColor = &HFFFFFF

s5.BackColor = &HFFFFFF

s6.BackColor = &HFFFFFF

s7.BackColor = &HFFFFFF

s8.BackColor = &HFFFFFF

s9.BackColor = &HFFFFFF

sa.BackColor = &HFFFFFF

Label1.BackColor = &HFFFFFF

Else

If itmno <> Label1 Then

MsgBox eropstn

fist

Exit Sub

End If

If s1 = "" Then

If s2 = "" Then

If s3 = "" Then

If s4 = "" Then

If s5 = "" Then

If s6 = "" Then

If s7 = "" Then

If s8 = "" Then

If s9 = "" Then

If sa = "" Then

MsgBox "尚未作答 Select you'r answer"

Exit Sub

End If

End If

End If

End If

End If

End If

End If

End If

End If

End If

pwr = Label2

If s1 <> a1 Then

ermsg = ermsg & " 1"

s1.BackColor = &HC0C0FF

Else

s1.BackColor = &HFFFFFF

End If

If s2 <> a2 Then

ermsg = ermsg & " 2"

s2.BackColor = &HC0C0FF

Else

s2.BackColor = &HFFFFFF

End If

If s3 <> a3 Then

ermsg = ermsg & " 3"

s3.BackColor = &HC0C0FF

Else

s3.BackColor = &HFFFFFF

End If

If s4 <> a4 Then

ermsg = ermsg & " 4"

s4.BackColor = &HC0C0FF

Else

s4.BackColor = &HFFFFFF

End If

If s5 <> a5 Then

ermsg = ermsg & " 5"

s5.BackColor = &HC0C0FF

Else

s5.BackColor = &HFFFFFF

End If

If s6 <> a6 Then

ermsg = ermsg & " 6"

s6.BackColor = &HC0C0FF

Else

s6.BackColor = &HFFFFFF

End If

If s7 <> a7 Then

ermsg = ermsg & " 7"

s7.BackColor = &HC0C0FF

Else

s7.BackColor = &HFFFFFF

End If

If s8 <> a8 Then

ermsg = ermsg & " 8"

s8.BackColor = &HC0C0FF

Else

s8.BackColor = &HFFFFFF

End If

If s9 <> a9 Then

ermsg = ermsg & " 9"

s9.BackColor = &HC0C0FF

Else

s9.BackColor = &HFFFFFF

End If

If sa <> aa Then

ermsg = ermsg & " 10"

sa.BackColor = &HC0C0FF

Else

sa.BackColor = &HFFFFFF

End If

If ermsg = "" Then

If sno = flow Then

MsgBox eropstn

ermsg = ""

nex

Exit Sub

End If

rt = rt + 1

den = den + pwr - 1

num = num + pwr - 1

Label1.BackColor = &HFFFFFF

MsgBox rtstn

sno = flow

nex

Else

If sno = flow Then

MsgBox mg & " : " & ermsg & " , " & eropstn

ermsg = ""

nex

Exit Sub

End If

er = er + 1

den = den + pwr - 1

erstring = erstring & " " & itmno

Label1.BackColor = &HC0C0FF

MsgBox mg & " : " & ermsg

sno = flow

nex

End If

End If

itmno = itmno + 1

ermsg = ""

Label3 = "E-test6"

Label3.Width = 78

Label3.Top = 5

Label3.Left = 642

Label3.Height = 32

End Sub

Private Sub Label2_Click()

If tea = 1 Then

If pwr = 0 Then pwr = 1

pwr = pwr + 1

If pwr = 5 Then pwr = 1

Label2 = pwr

Else

Exit Sub

End If

End Sub