Checked property of CheckBox Control ?

Posted on 2008-01-29
Medium Priority
Last Modified: 2013-11-26
I have a CheckBox control called HiddenCheckBox. If I want to change its value I can do Me.HiddenCheckBox.Checked = True. But when I try to get this Checked Property like in this code below it does not seem to be exposed. Why is this, how can I set it in this manner (using the For Each...)?

        Dim cControl As Control
        For Each cControl In Me.Controls
            If (TypeOf cControl Is CheckBox) Then
                      cControl.hiddencheckbox IS NOT EXPOSED!!! ??
            End If
        Next cControl
Question by:Lisa0812
1 Comment

Accepted Solution

AUmidh earned 200 total points
ID: 20774870
Dim cControl As Control
        For Each cControl In Me.Controls
            If (TypeOf cControl Is CheckBox) Then
                      CType(cControl,CheckBox).Checked=true  ' Get or set like this...
            End If
        Next cControl

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

619 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