iterating checkboxes

  • Thread starter Thread starter dimplewathen
  • Start date Start date
D

dimplewathen

I've got a few checkboxes in a sheet, "CheckBox1" through "CheckBox3".

I can do this:

c = CheckBox1.Value
etc.

But how would I iterate over them? Like, if I could do this:

c = CheckBox(1).Value

Things like this don't work:

c = ActiveSheet.Shapes("CheckBox1").Value
 
just found an answer....

For i = 1 to 3
CheckBoxStr = "CheckBox" + CStr(i)
c = ActiveSheet.OLEObjects(CheckBoxStr).Object.value
...
next

how very odd...
 

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

Back
Top