Use Variable In CheckBox Name

  • Thread starter Thread starter mudraker
  • Start date Start date
M

mudraker

I have 12 Checkboxes on a form named cb1 to cb12.

From within a for loop I need to test 1 to 12 step 1

For i = 1 to 12 step 1
how do I test checkbox value for cb & i
e.g. if i = 1, I need value cb1
if i = 7, I need to value of cb7
next 1

thanks in advance
 
dim iCtr as long
for ictr = 1 to 12
msgbox me.controls("CB" & ictr).value
next ictr
 
Back
Top