Hello,
I am using the following macro code I got of the internet to add hundreds of checkboxes and link them. It works fine, except I only want a linked checkbox on every 10th row (ie, check box on row 9, then row 19, etc) -- how do I change the below code to do this? THANKS
Sub LinkCheckBoxes()
Dim chk As CheckBox
Dim lCol As Long
lCol = 2 'number of columns to the right for link
For Each chk In ActiveSheet.CheckBoxes
With chk
.LinkedCell = _
.TopLeftCell.Offset(0, lCol).Address
End With
Next chk
End Sub
I am using the following macro code I got of the internet to add hundreds of checkboxes and link them. It works fine, except I only want a linked checkbox on every 10th row (ie, check box on row 9, then row 19, etc) -- how do I change the below code to do this? THANKS
Sub LinkCheckBoxes()
Dim chk As CheckBox
Dim lCol As Long
lCol = 2 'number of columns to the right for link
For Each chk In ActiveSheet.CheckBoxes
With chk
.LinkedCell = _
.TopLeftCell.Offset(0, lCol).Address
End With
Next chk
End Sub