Check Boxes

C

CAL

I have a listing of names with several columns with checkboxes (using control
toolbox). I linked the check box to the cell using a range (F:F) and then
copied this cell to the other columns in that row and edited the column
range. Then I selected all checkboxes in that row and copied down to the
rest of the rows. There are over 1,000 rows and 10 colums that need check
boxes. When I select the first checkbox, all check boxes in that column
automatically select. I don't need to link each checkbox to a specific cell,
do I? That would take forever.
 
L

Luke M

While you do need to define each check box, there's no need for it to take
forever.
Assuming you already have the 10,000 checkboxes created, and they still have
their default names, you could run this short macro:

Sub DefineCheckBox()
Dim sh As Shape
r = 1 'Row 1
c = 6 'Column F
For Each sh In ActiveSheet.Shapes
sh.Select
If Left(sh.Name, 9) = "Check Box" Then
Selection.LinkedCell = Cells(r, c).Address
r = r + 1
'How many rows down before changing columns?
If r > 1000 Then
r = 1
c = c + 1
End If
End If
Next sh
End Sub
 

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