phillip Posted April 8, 2005 Posted April 8, 2005 I have 20 checkboxes Is it possible to uncheck them all without listing eachone in turn they are call check1 to check20 Thanks Quote phillip Restall
Leaders snarfblam Posted April 8, 2005 Leaders Posted April 8, 2005 If you want to check every checkbox contained directly by the form (i.e. not in a panel/group box/etc.) you could do this: For Each Item As Control In Me.Controls If Typeof Item Is CheckBox Then DirectCast(Item, CheckBox).Checked=False End If Next Item Likewise, you could do this to a panel's control collection, or any other container control. Quote [sIGPIC]e[/sIGPIC]
phillip Posted April 8, 2005 Author Posted April 8, 2005 I have them in a panel. how do i check them all in this panel? Quote phillip Restall
Administrators PlausiblyDamp Posted April 9, 2005 Administrators Posted April 9, 2005 For Each Item As Control In PanelName.Controls If Typeof Item Is CheckBox Then DirectCast(Item, CheckBox).Checked=False End If Next Item Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.