Hi,
I have a pile of checkboxes on one particular form and would like to clear them all at the form load rather that saying chk1.Checked = False for all of them.
Here is the code I was trying to use but 'checked' is not a member of Systems.Windows .Forms.Controls .
[Code=VBNET]
Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is CheckBox Then
ctl.checked = False
End If
Next ctl
[/CODE]
How can I fix this??
Thanks.
I have a pile of checkboxes on one particular form and would like to clear them all at the form load rather that saying chk1.Checked = False for all of them.
Here is the code I was trying to use but 'checked' is not a member of Systems.Windows .Forms.Controls .
[Code=VBNET]
Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is CheckBox Then
ctl.checked = False
End If
Next ctl
[/CODE]
How can I fix this??
Thanks.
Comment