Creating multiple check boxes in a userform

brooksc29

Active Member
Joined
Jul 25, 2010
Messages
333
I'm trying to add 32 check boxes in a user form. Does each check box go in a separate user form?

Once I create the check box in a user form, where do I enter the code that will represent what to do when the box is checked?

Is there a way to only allow 10 of the 32 check boxes to be checked at one time?

Never used user forms before, and have pretty decent experience with VBA.

Any help would be appreciated!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Well it should be easy enough just to add them in design mode from the toolbox.

You could add them individually but you could always add a couple, copy and paste, copy and paste... until you have the required number.

How do deal with them after that depends on a few things, the main one being what you are actually trying to do.

PS Have you considered not using 32 checkboxes?

You could create a listbox with 32 items each with a checkbox next to it.

That would be only 1 control you would have to deal with rather than 32.:)
 
Upvote 0
There really is no reason for a whole new form for each checkbox.

You can definitely put 32 checkboxes on a userform. You can modify the scrollbars to vertical or both, and the scroll height to accomodate 32 checkboxes.

Do you want something to happen when each checkbox is checked?
Is it something different for each checkbox, or is it essentially the same for each checkbox?

Depending on your situation you may want to add the checkboxes on the userform u sing the toolbox. Possibly adding a checkbox event to each one.

With 32 checkboxes, you might consider a custom class. This way you can add the checkboxes dynamically to the form at runtime, and depending on what you want to accomplish, you can right one checkbox event, and it will work for all of the checkboxes.
 
Upvote 0
yes, i actually have a list box with all 32 in it, but i need to be able to select more than one check box at a time (actually up to ten at a time).

Each check box will represent a statistic and each checkbox will have code attached to it to look for that statistic on a master data page and return that statistic to a different part of the page.
 
Upvote 0
I'm confused - do you have a listbox or multiple checkboxes?

If you have a listbox and want to choose multiple items then just use it's MultiSelect option.

Restricting how many items are selected might be a bit trickier.

It could depend on when you wanted to check how many items are selected and what you want to happen when the limit is reached/broken.
 
Upvote 0
Change the Multiselect property of the listbox to allow multiple selections.

Then you can select multiple rows by holding down control.



In the routine that 'processes' the choices I would:
Loop through the selected rows.
For each selected row I would use a Select Case statement to handle the different behaviors for each choice.
 
Upvote 0
thanks! that was easy to create the multiple check boxes in the list box...

this is a copy (soft of) of what my page looks like...

the left is the list box with 32 different items, all with their own check box. what I would like to do is be able to search for each statistic that is checked on a different data page and have the name of the player with that statistic chosen that is w/in 10% of the Target Player's statistic return to each box here. There are 10 boxes, so I want the user to be able to select 10 different statistics. How do I add code to each item in the list box?



<table style="border-collapse: collapse; width: 890pt;" border="0" cellpadding="0" cellspacing="0" width="1180"><col style="width: 48pt;" width="64" span="3"> <col style="width: 19pt;" width="25"> <col style="width: 31pt;" width="41"> <col style="width: 17pt;" width="22"> <col style="width: 72pt;" width="96"> <col style="width: 19pt;" width="25"> <col style="width: 31pt;" width="41"> <col style="width: 17pt;" width="22"> <col style="width: 72pt;" width="96"> <col style="width: 19pt;" width="25"> <col style="width: 31pt;" width="41"> <col style="width: 17pt;" width="22"> <col style="width: 72pt;" width="96"> <col style="width: 19pt;" width="25"> <col style="width: 31pt;" width="41"> <col style="width: 17pt;" width="22"> <col style="width: 72pt;" width="96"> <col style="width: 19pt;" width="25"> <col style="width: 31pt;" width="41"> <col style="width: 17pt;" width="22"> <col style="width: 72pt;" width="96"> <col style="width: 51pt;" width="68"> <tbody><tr style="height: 8.1pt;" height="10"> <td style="height: 8.1pt; width: 48pt;" align="left" valign="top" width="64" height="10"><!--[if gte vml 1]><v:shapetype id="_x0000_t201" coordsize="21600,21600" o:spt="201" path="m,l,21600r21600,l21600,xe"> <v:stroke joinstyle="miter"/> <v:path shadowok="f" o:extrusionok="f" strokeok="f" fillok="f" o:connecttype="rect"/> <o:lock v:ext="edit" shapetype="t"/> </v:shapetype><v:shape id="STATISTICS" o:spid="_x0000_s1025" type="#_x0000_t201" style='position:absolute;margin-left:3.75pt;margin-top:2.25pt;width:109.5pt; height:397.5pt;z-index:1' stroked="f" strokecolor="windowText [64]" o:insetmode="auto"> <v:imagedata src="file:///C:\DOCUME~1\cbrooks\LOCALS~1\Temp\msohtmlclip1\01\clip_image001.emz" o:title=""/> <x:ClientData ObjectType="Pict"> <x:SizeWithCells/> <x:DefaultSize/> <x:AutoLine>False</x:AutoLine> <x:CF>Pict</x:CF> <x:MapOCX/> </x:ClientData> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if !vml]-->
clip_image002.gif
<!--[endif]--> <table cellpadding="0" cellspacing="0"> <tbody><tr> <td style="height: 8.1pt; width: 48pt;" width="64" height="10">
</td> </tr> </tbody></table> </td> <td style="width: 48pt;" width="64">
</td> <td style="width: 48pt;" width="64">
</td> <td style="width: 19pt;" width="25">
</td> <td style="width: 31pt;" width="41">
</td> <td style="width: 17pt;" width="22">
</td> <td style="width: 72pt;" width="96">
</td> <td style="width: 19pt;" width="25">
</td> <td style="width: 31pt;" width="41">
</td> <td style="width: 17pt;" width="22">
</td> <td style="width: 72pt;" width="96">
</td> <td style="width: 19pt;" width="25">
</td> <td style="width: 31pt;" width="41">
</td> <td style="width: 17pt;" width="22">
</td> <td style="width: 72pt;" width="96">
</td> <td style="width: 19pt;" width="25">
</td> <td style="width: 31pt;" width="41">
</td> <td style="width: 17pt;" width="22">
</td> <td style="width: 72pt;" width="96">
</td> <td style="width: 19pt;" width="25">
</td> <td style="width: 31pt;" width="41">
</td> <td style="width: 17pt;" width="22">
</td> <td style="width: 72pt;" width="96">
</td> <td style="width: 51pt;" width="68">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td style="height: 12.75pt;" height="17">
</td> <td>
</td> <td>
</td> <td>
</td> <td colspan="4" rowspan="2" class="xl93" style="border-right: 1pt solid black; border-bottom: 1pt solid black;">TARGET PLAYER</td> <td colspan="4" rowspan="2" style="height: 26.25pt; width: 139pt;" align="left" valign="top" width="184" height="35"><!--[if gte vml 1]><v:shape id="ComboBox1" o:spid="_x0000_s1029" type="#_x0000_t201" style='position:absolute;margin-left:0;margin-top:0; width:147pt;height:26.25pt;z-index:2' stroked="f" strokecolor="windowText [64]" o:insetmode="auto"> <v:imagedata src="file:///C:\DOCUME~1\cbrooks\LOCALS~1\Temp\msohtmlclip1\01\clip_image003.emz" o:title=""/> <x:ClientData ObjectType="Pict"> <x:SizeWithCells/> <x:DefaultSize/> <x:AutoLine>False</x:AutoLine> <x:CF>Pict</x:CF> <x:AutoPict/> <x:MapOCX/> </x:ClientData> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if !vml]-->
clip_image004.gif
<!--[endif]--> <table cellpadding="0" cellspacing="0"> <tbody><tr> <td colspan="4" rowspan="2" class="xl72" style="height: 26.25pt; width: 139pt;" width="184" height="35">
</td> </tr> </tbody></table> </td> <td class="xl72">
</td> <td class="xl72">
</td> <td>
</td> <td colspan="5" rowspan="2" class="xl85" style="border-right: 1pt solid black; border-bottom: 1pt solid black;"> </td> <td colspan="4" rowspan="2" class="xl101" style="border-right: 1pt solid black; border-bottom: 1pt solid black;">CLOSEST COMP</td> </tr> <tr style="height: 13.5pt;" height="18"> <td style="height: 13.5pt;" height="18">
</td> <td>
</td> <td>
</td> <td>
</td> <td class="xl72">
</td> <td class="xl72">
</td> <td>
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td style="height: 12.75pt;" height="17">
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td colspan="3" rowspan="3" style="height: 31.5pt; width: 122pt;" width="162" height="42"><!--[if gte vml 1]><v:shape id="_x0000_s1031" type="#_x0000_t201" style='position:absolute;margin-left:55.5pt; margin-top:9pt;width:61.5pt;height:21pt;z-index:3;mso-wrap-style:tight' fillcolor="#e3e3e3" stroked="f" strokecolor="windowText [64]" o:insetmode="auto"> <v:path shadowok="t" strokeok="t" fillok="t"/> <o:lock v:ext="edit" rotation="t"/> <v:textbox style='mso-direction-alt:auto' o:singleclick="f"> <![if excel]> *Platform
<![endif]></v:textbox> <![if excel]><x:ClientData ObjectType="Checkbox"> <x:SizeWithCells/> <x:AutoFill>False</x:AutoFill> <x:AutoLine>False</x:AutoLine> <x:TextVAlign>Center</x:TextVAlign> <x:NoThreeD/> </x:ClientData> <![endif]></v:shape><![endif]--><!--[if !vml]--> <table cellpadding="0" cellspacing="0"> <tbody><tr> <td width="74" height="12">
</td> </tr> <tr> <td>
</td> <td><!--[endif]--><!--[if !excel]-->
clip_image005.gif
<!--[endif]--><!--[if !vml]--></td> <td width="5">
</td> </tr> <tr> <td height="1">
</td> </tr> </tbody></table> <!--[endif]--><!--[if !mso & vml]><![endif]--></td> <td colspan="2" rowspan="3" style="height: 31.5pt; width: 89pt;" width="118" height="42"><!--[if gte vml 1]><v:shape id="_x0000_s1032" type="#_x0000_t201" style='position:absolute;margin-left:0;margin-top:9.75pt; width:61.5pt;height:21pt;z-index:4;mso-wrap-style:tight' fillcolor="#e3e3e3" stroked="f" strokecolor="windowText [64]" o:insetmode="auto"> <v:path shadowok="t" strokeok="t" fillok="t"/> <o:lock v:ext="edit" rotation="t"/> <v:textbox style='mso-direction-alt:auto' o:singleclick="f"> <![if excel]> Career
<![endif]></v:textbox> <![if excel]><x:ClientData ObjectType="Checkbox"> <x:SizeWithCells/> <x:AutoFill>False</x:AutoFill> <x:AutoLine>False</x:AutoLine> <x:TextVAlign>Center</x:TextVAlign> <x:NoThreeD/> </x:ClientData> <![endif]></v:shape><![endif]--><!--[if !vml]--> <table cellpadding="0" cellspacing="0"> <tbody><tr> <td width="0" height="13">
</td> </tr> <tr> <td>
</td> <td><!--[endif]--><!--[if !excel]-->
clip_image006.gif
<!--[endif]--><!--[if !vml]--></td> <td width="35">
</td> </tr> <tr> <td height="0">
</td> </tr> </tbody></table> <!--[endif]--><!--[if !mso & vml]><![endif]--></td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td style="height: 12.75pt;" height="17">
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 6pt;" height="8"> <td style="height: 6pt;" height="8">
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 13.5pt;" height="18"> <td style="height: 13.5pt;" height="18">
</td> <td>
</td> <td>
</td> <td class="xl75">Rnk</td> <td class="xl74">Stat</td> <td colspan="2" class="xl91" style="border-right: 1pt solid black;">Player</td> <td class="xl75" style="border-left: medium none;">Rnk</td> <td class="xl74">Stat</td> <td colspan="2" class="xl91" style="border-right: 1pt solid black;">Player</td> <td class="xl75" style="border-left: medium none;">Rnk</td> <td class="xl74">Stat</td> <td colspan="2" class="xl91" style="border-right: 1pt solid black;">Player</td> <td class="xl75" style="border-left: medium none;">Rnk</td> <td class="xl74">Stat</td> <td colspan="2" class="xl91" style="border-right: 1pt solid black;">Player</td> <td class="xl75" style="border-left: medium none;">Rnk</td> <td class="xl74">Stat</td> <td colspan="2" class="xl91" style="border-right: 1pt solid black;">Player</td> <td>
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td style="height: 12.75pt;" height="17">
</td> <td>
</td> <td>
</td> <td class="xl78" style="border-top: medium none;">1</td> <td class="xl73" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl99" style="border-right: 1pt solid black;"> </td> <td class="xl78" style="border-top: medium none; border-left: medium none;">1</td> <td class="xl73" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl99" style="border-right: 1pt solid black;"> </td> <td class="xl78" style="border-top: medium none; border-left: medium none;">1</td> <td class="xl73" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl99" style="border-right: 1pt solid black;"> </td> <td class="xl78" style="border-top: medium none; border-left: medium none;">1</td> <td class="xl73" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl99" style="border-right: 1pt solid black;"> </td> <td class="xl78" style="border-top: medium none; border-left: medium none;">1</td> <td class="xl73" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl99" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl79" style="border-top: medium none;">2</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl79" style="border-top: medium none;">3</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">3</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">3</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">3</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">3</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl79" style="border-top: medium none;">4</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">4</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">4</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">4</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">4</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl79" style="border-top: medium none;">5</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">5</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">5</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">5</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">5</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl79" style="border-top: medium none;">6</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">6</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">6</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">6</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">6</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl79" style="border-top: medium none;">7</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">7</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">7</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">7</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">7</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl79" style="border-top: medium none;">8</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">8</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">8</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">8</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">8</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl79" style="border-top: medium none;">9</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">9</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">9</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">9</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">9</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl80" style="border-top: medium none;">10</td> <td class="xl77" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl83" style="border-right: 1pt solid black;"> </td> <td class="xl80" style="border-top: medium none; border-left: medium none;">10</td> <td class="xl77" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl83" style="border-right: 1pt solid black;"> </td> <td class="xl80" style="border-top: medium none; border-left: medium none;">10</td> <td class="xl77" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl83" style="border-right: 1pt solid black;"> </td> <td class="xl80" style="border-top: medium none; border-left: medium none;">10</td> <td class="xl77" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl83" style="border-right: 1pt solid black;"> </td> <td class="xl80" style="border-top: medium none; border-left: medium none;">10</td> <td class="xl77" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl83" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 3.95pt;" height="5"> <td style="height: 3.95pt;" height="5">
</td> <td>
</td> <td>
</td> <td colspan="20" rowspan="2" class="xl107" style="border-right: 1pt solid black; border-bottom: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 3.95pt;" height="5"> <td style="height: 3.95pt;" height="5">
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl75" style="border-top: medium none;">Rnk</td> <td class="xl74" style="border-top: medium none;">Stat</td> <td colspan="2" class="xl91" style="border-right: 1pt solid black;">Player</td> <td class="xl75" style="border-top: medium none; border-left: medium none;">Rnk</td> <td class="xl74" style="border-top: medium none;">Stat</td> <td colspan="2" class="xl91" style="border-right: 1pt solid black;">Player</td> <td class="xl75" style="border-top: medium none; border-left: medium none;">Rnk</td> <td class="xl74" style="border-top: medium none;">Stat</td> <td colspan="2" class="xl91" style="border-right: 1pt solid black;">Player</td> <td class="xl75" style="border-top: medium none; border-left: medium none;">Rnk</td> <td class="xl74" style="border-top: medium none;">Stat</td> <td colspan="2" class="xl91" style="border-right: 1pt solid black;">Player</td> <td class="xl75" style="border-top: medium none; border-left: medium none;">Rnk</td> <td class="xl74" style="border-top: medium none;">Stat</td> <td colspan="2" class="xl91" style="border-right: 1pt solid black;">Player</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl78" style="border-top: medium none;">1</td> <td class="xl73" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl99" style="border-right: 1pt solid black;"> </td> <td class="xl78" style="border-top: medium none; border-left: medium none;">1</td> <td class="xl73" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl99" style="border-right: 1pt solid black;"> </td> <td class="xl78" style="border-top: medium none; border-left: medium none;">1</td> <td class="xl73" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl99" style="border-right: 1pt solid black;"> </td> <td class="xl78" style="border-top: medium none; border-left: medium none;">1</td> <td class="xl73" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl99" style="border-right: 1pt solid black;"> </td> <td class="xl78" style="border-top: medium none; border-left: medium none;">1</td> <td class="xl73" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl99" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl79" style="border-top: medium none;">2</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl79" style="border-top: medium none;">3</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">3</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">3</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">3</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">3</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl79" style="border-top: medium none;">4</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">4</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">4</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">4</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">4</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl79" style="border-top: medium none;">5</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">5</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">5</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">5</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">5</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl79" style="border-top: medium none;">6</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">6</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">6</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">6</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">6</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl79" style="border-top: medium none;">7</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">7</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">7</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">7</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">7</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl79" style="border-top: medium none;">8</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">8</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">8</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">8</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">8</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl79" style="border-top: medium none;">9</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">9</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">9</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">9</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td class="xl79" style="border-top: medium none; border-left: medium none;">9</td> <td class="xl76" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl81" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td class="xl80" style="border-top: medium none;">10</td> <td class="xl77" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl83" style="border-right: 1pt solid black;"> </td> <td class="xl80" style="border-top: medium none; border-left: medium none;">10</td> <td class="xl77" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl83" style="border-right: 1pt solid black;"> </td> <td class="xl80" style="border-top: medium none; border-left: medium none;">10</td> <td class="xl77" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl83" style="border-right: 1pt solid black;"> </td> <td class="xl80" style="border-top: medium none; border-left: medium none;">10</td> <td class="xl77" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl83" style="border-right: 1pt solid black;"> </td> <td class="xl80" style="border-top: medium none; border-left: medium none;">10</td> <td class="xl77" style="border-top: medium none; border-left: medium none;"> </td> <td colspan="2" class="xl83" style="border-right: 1pt solid black;"> </td> <td>
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td style="height: 12.75pt;" height="17">
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> <td>
</td> </tr> </tbody></table>
 
Upvote 0
Do you actually have 32 checkboxes or is it a listbox which is displaying each item with a checkbox?

If it's the latter then you don't need code for each individual item, they are all 'part' of the listbox.

PS Your copy/image didn't come across very well - could be something to do with the board sofware.

So, for example, you could loop through all the items in the listbox and check is Selected property to see if it has been selected.
 
Upvote 0

Forum statistics

Threads
1,224,722
Messages
6,180,563
Members
452,987
Latest member
mrfitness_79

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top