Need help with a group panel and check boxes [Resolved]
Hey,
I have 7 check boxes inside a group panel. I need to make sure at least one of them is checked. How can I do this I can't wrap my mind around something like this.
Here is some code that loop through all the checkboxes in the panel but for the life of me i can't figure out how to make sure at least one is checked.
Code:
for each cb as checkbox in gpOutput.Controls
'some code to test to make sure at least one of the 7 check boxes is checked
netxt
Thank you masters :)
Re: Need help with a group panel and check boxes
I cranked this out pretty quick, with out testing, so check the syntax:
VB Code:
dim b as boolean
for each cb as checkbox in gpoutput.controls
if cb.checked = true then
b = true
exit for
end if
Next
if not b then
messagebox.show("Check a box")
exit sub
end if
Re: Need help with a group panel and check boxes
Re: Need help with a group panel and check boxes
Worked like a charm!
Is there anything you CAN'T do?