• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 164
  • Last Modified:

Check to see if all the checkboxs are checked

How would I check to see if all the checkboxes are checked on a form??
0
Richard Kreidl
Asked:
Richard Kreidl
1 Solution
 
Carl TawnSystems and Integration DeveloperCommented:
Use something like:

           Dim AllChecked As Boolean = True

        For Each c As Control In Me.Controls
            If TypeOf c Is CheckBox Then
                If Not CType(c, CheckBox).Checked Then
                    AllChecked = False
                    Exit For
                End If
            End If
        Next

        If AllChecked Then
            '// All checkboxes are checked
            MessageBox.Show("AllChecked")
        Else
            MessageBox.Show("Not AllChecked")
        End If
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now