cycle through checkboxes

R

Ryan Ragno

Hi,

I currently have 18 checkboxes down 18 rows, each with thier own linked cell
in a seperate column (which is hidden from the user) that my macro's use to
read or change the state of any checkbox.

This linking works when i click on the checkbox (i.e. when i click on any
checkbox, to toggle it's state, the linked cell changes also), but when i use
a macro to change the state of the linked cell, the checkbox's state doesn't
change :S

Once i use my cursor to change the checkbox's state by hand twice, the
linked cell begins to change on cursor clicks again. What am i doing wrong?
if that question cannot be answered could someone tell me how to cycle
through each checkbox so that i can toggle thier states manually?

Thank you SO much (in advance),
Ryan
 
C

cush

You might try something like this:

Name your Checkboxes cb1 thru cb18

then use code like this:

Dim i as Integer

For i = 1 to 18
If activesheet.Shapes("cb"&i) then
'Do stuff
Else
'Do something else
End if
Next i
 

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