Multiple Check Boxes

  • Thread starter Thread starter paps
  • Start date Start date
P

paps

I have figured out how to add a check box to an excel worksheet, and
have figured out how to link the box to another cell.

I need to add check boxes next to multiple columns, but the cell lin
always stays consistent with the original link.

For instance. I add a check box in cell C1 and link it to D1. When
try to drag or copy the cell to C2, the link for the check box in C
remains D1. So when you click one check box, they all check an
uncheck.

I don't want to have to update 500+ links, and I have removed the "$
in the cell link and that didn't work. Is there a way to copy or clic
and drag the check boxes so the links update as would a normal cell.

Hope I was clear.

Thanks in advance
 
try this
Sub DuplicateCBs()
Set z = ActiveSheet.DrawingObjects("Check Box 1") 'assumes first one
is there, linked to X1.
For i = 1 To 20
z.ShapeRange.Duplicate.Select
Selection.ShapeRange.IncrementLeft -12#
Selection.ShapeRange.IncrementTop 10.5
Selection.LinkedCell = "$X$" & i + 1
Set z = Selection
Next
End Sub

Bob Umlas
Excel MVP
 
Back
Top