G Guest Mar 16, 2005 #1 Hi, I have a form with 6 checkboxes. What is the best way to count how many checkboxes have been checked? Thanks
Hi, I have a form with 6 checkboxes. What is the best way to count how many checkboxes have been checked? Thanks
M Morten Wennevik Mar 16, 2005 #2 Hi Jez, You could keep the CheckBoxes in a CheckBox array int count = 0; foreach(CheckBox cb in CBArray) if(cb.Checked) count++; Not sure why you would want to know how may CheckBoxes are checked instead of which ones.
Hi Jez, You could keep the CheckBoxes in a CheckBox array int count = 0; foreach(CheckBox cb in CBArray) if(cb.Checked) count++; Not sure why you would want to know how may CheckBoxes are checked instead of which ones.
C cody Mar 16, 2005 #3 It would also possible to use a CheckListBox where you could use clb.CheckedItems.Count