太复杂了,只用一个if就可以了,看下面程序
If CheckBox1.Value = True And CheckBox2.Value = True And CheckBox3.Value = True And CheckBox4.Value = True Then
MsgBox "你真厉害,完全正确!", vbOKOnly, "提示"
ElseIf CheckBox1.Value = True And CheckBox2.Value = True And CheckBox3.Value = True Or CheckBox1.Value = True And CheckBox2.Value = True And CheckBox4.Value = True Or CheckBox1.Value = True And CheckBox3.Value = True And CheckBox4.Value = True Or CheckBox2.Value = True And CheckBox3.Value = True And CheckBox4.Value = True Then
MsgBox "只选对3个,继续努力!", vbOKOnly, "提示"
ElseIf CheckBox1.Value = True And CheckBox2.Value = True Or CheckBox1.Value = True And CheckBox3.Value = True Or CheckBox1.Value = True And CheckBox4.Value = True Or CheckBox2.Value = True And CheckBox3.Value = True Or CheckBox2.Value = True And CheckBox4.Value = True Or CheckBox3.Value = True And CheckBox4.Value = True Then
MsgBox "只选对2个,继续努力!", vbOKOnly, "提示"
ElseIf CheckBox1.Value = True Or CheckBox2.Value = True Or CheckBox3.Value = True Or CheckBox4.Value = True Then
MsgBox "只选对1个,继续努力!", vbOKOnly, "提示"
End If
如果满意请采纳,谢谢