I found these two macros on the internet. The first macro works fine. I have no problem with that. What I want is also this: When the check box is ticked, I want the cell that the check box is in to turn green. The second macro only works on one check box. It does not work on all of them and I have 466 check boxes to deal with. Please help.
Sub Checkboxes()
i = 2
For Each cb In ActiveSheet.CheckBoxes
cb.LinkedCell = Cells(i, "C").Address
i = i + 1
Next cb
End Sub
Sub CheckBox1_Click()
Dim xRng As Range
Set xRng = Selection
If CheckBox1.Value = True Then
xRng.Interior.Color = vbGreen
Else
xRng.Interior.Color = xlNone
End If
End Sub
Sub Checkboxes()
i = 2
For Each cb In ActiveSheet.CheckBoxes
cb.LinkedCell = Cells(i, "C").Address
i = i + 1
Next cb
End Sub
Sub CheckBox1_Click()
Dim xRng As Range
Set xRng = Selection
If CheckBox1.Value = True Then
xRng.Interior.Color = vbGreen
Else
xRng.Interior.Color = xlNone
End If
End Sub