Solved

Check to see if all the checkboxs are checked

Posted on 2006-07-21
1
153 Views
Last Modified: 2011-09-20
How would I check to see if all the checkboxes are checked on a form??
0
Comment
Question by:rkckjk
1 Comment
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 250 total points
ID: 17154918
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now