|
-
May 9th, 2005, 03:59 PM
#1
Thread Starter
Addicted Member
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
Last edited by Porsche944; May 9th, 2005 at 08:32 PM.
-
May 9th, 2005, 04:08 PM
#2
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
-
May 9th, 2005, 08:19 PM
#3
Thread Starter
Addicted Member
Re: Need help with a group panel and check boxes
-
May 9th, 2005, 08:31 PM
#4
Thread Starter
Addicted Member
Re: Need help with a group panel and check boxes
Worked like a charm!
Is there anything you CAN'T do?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|