Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub CommandButton2_Click()
- question_clear = MsgBox("Are you sure you want to check your test? ", vbYesNo + vbQuestion, "WARNING!")
- If question_clear = 7 Then Exit Sub
- If question_clear = 6 Then
- If OB1.Value = True Then count_of_good = count_of_good + 1
- If OB3.Value = True Then count_of_good = count_of_good + 1
- If OB9.Value = True Then count_of_good = count_of_good + 1
- If OB11.Value = True Then count_of_good = count_of_good + 1
- If OB13.Value = True Then count_of_good = count_of_good + 1
- If OB15.Value = True Then count_of_good = count_of_good + 1
- If OB16.Value = True Then count_of_good = count_of_good + 1
- If OB6.Value = True Then count_of_good = count_of_good + 2
- If OB5.Value = True Then count_of_good = count_of_good + 1
- If OB2.Value = True Then count_of_bad = count_of_bad + 1
- If OB4.Value = True Then count_of_bad = count_of_bad + 1
- If OB7.Value = True Then count_of_bad = count_of_bad + 1
- If OB8.Value = True Then count_of_bad = count_of_bad + 1
- If OB10.Value = True Then count_of_bad = count_of_bad + 1
- If OB12.Value = True Then count_of_bad = count_of_bad + 1
- If OB14.Value = True Then count_of_bad = count_of_bad + 1
- If OB17.Value = True Then count_of_bad = count_of_bad + 1
- End If
- If count_of_bad > count_of_good Then
- OB1.Value = False
- OB2.Value = False
- OB3.Value = False
- OB4.Value = False
- OB5.Value = False
- OB6.Value = False
- OB7.Value = False
- OB8.Value = False
- OB9.Value = False
- OB10.Value = False
- OB11.Value = False
- OB12.Value = False
- OB13.Value = False
- OB14.Value = False
- OB15.Value = False
- OB16.Value = False
- OB17.Value = False
- StName.Value = ""
- Surname.Value = ""
- ComboBox1.Value = "Group"
- question_clear = MsgBox("You are a bad person!")
- End If
- If count_of_bad < count_of_good Then
- OB1.Value = False
- OB2.Value = False
- OB3.Value = False
- OB4.Value = False
- OB5.Value = False
- OB6.Value = False
- OB7.Value = False
- OB8.Value = False
- OB9.Value = False
- OB10.Value = False
- OB11.Value = False
- OB12.Value = False
- OB13.Value = False
- OB14.Value = False
- OB15.Value = False
- OB16.Value = False
- OB17.Value = False
- StName.Value = ""
- Surname.Value = ""
- ComboBox1.Value = "Group"
- question_clear = MsgBox("You are a good person!")
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement