Use Variable In CheckBox Name

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
 
D

Dave Peterson

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top