Tekforums

Chat => Entertainment & Technology => Topic started by: SwissToni on February 01, 2008, 20:41:43 PM

Title: Uncheck multiple Checkboxes in VB2005.net
Post by: SwissToni on February 01, 2008, 20:41:43 PM
just started a module in VB and im struggling on this :D

lecturer says i must use "with-end with" statements to clear 3 checkboxes i have in a groupbox

obviously unchecking checkboxes 1 by 1 isnt an issue, but this with-end with statement has me puzzled :)

i understand its use when im trying to change multipe properties of 1 object, a textbox, label etc, but im struggling to understand how i can use it to change 1 property of multiple objects :)
Title: Re:Uncheck multiple Checkboxes in VB2005.net
Post by: SwissToni on February 05, 2008, 17:09:41 PM
got it now :)
Title: Uncheck multiple Checkboxes in VB2005.net
Post by: Mardoni on February 05, 2008, 17:12:56 PM
I hope youre using a for-each next loop with your with end-with block :)
Title: Re:Uncheck multiple Checkboxes in VB2005.net
Post by: madmax on February 15, 2008, 21:05:35 PM
aye always find a for each better


for each chkbox in etc...
 chkbox.checked = false
next