Links to multiple Checkboxes

B

Bahboosh

I'm trying to link a range of cells that include checkboxes to an
adjacent column, but i dont want to go into each cell and link them
seperatley. Is there an easier way to do this?
Ex.:

A1:A100 include the checkboxes


C1:C100 linked cells


Thanks
 
G

Guest

Sub LinkBoxes()
Dim cbox As CheckBox
For Each cbox In ActiveSheet.CheckBoxes
Set rng = cbox.TopLeftCell '(or cbox.BottomRightCell)
cbox.LinkedCell = rng.Offset(0, 1).Address
Next
End Sub

The success of this method will depend on where the control is sitting (i.e.
what cell is returned for topleftcell [or bottomrightcell]).

if the top left corner is over the cell to the left of where you want to
link you are good to go.
 

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