Hi all!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
I have 14 checkboxes in a userform and I need a VBA code to verify all of them and do something. <o></o>
The code I need may have the structure below. Of course it doesn’t work.
I will post it just for you to see know what I have in mind. I named my checkboxes CB1, CB2, CB3,…,CB14.<o></o>
I would appreciate any help I could get. <o></o>
I have 14 checkboxes in a userform and I need a VBA code to verify all of them and do something. <o></o>
The code I need may have the structure below. Of course it doesn’t work.
I will post it just for you to see know what I have in mind. I named my checkboxes CB1, CB2, CB3,…,CB14.<o></o>
I would appreciate any help I could get. <o></o>
Rich (BB code):
Redim array1(1 to 14)<o:p></o:p>
For j = 1 To 14<o:p></o:p>
if UserForm2.CB & j = True Then <o:p></o:p>
array1(j) = True<o:p></o:p>
select case array(j)=true<o:p></o:p>
case array1(1)<o:p></o:p>
.<o:p></o:p>
.case array(2)<o:p></o:p>
.<o:p></o:p>
<o:p>.</o:p>
Case array1(14)<o:p></o:p>
End select<o:p></o:p>
End if<o:p></o:p>
<o:p></o:p>Next j<o:p></o:p>