msgbox when all checkboxes empty
<p>I am trying to build a code which will warn the user with a message box if all checkboxes are left empty in my userform.</p>

<p>Any help on how to refer to all checkbox controls in one userform to build out this code would be appreciated.</p>

<p>Below is an example of the code I have tried, but it does not work.</p>

<pre><code>Dim Allcheckbox As Variant

Allcheckbox = Array("checkbox1", "checkbox2", "checkbox3", "checkbox4", "checkbox5", "checkbox6")
If Controls(Allcheckbox).Value = False Then
   MsgBox ("Please select a comparison criteria.")
End If
</code></pre>