Hi,
I have a Macro that adds checkboxes, I protect the sheet and when I run a different macro to uncheck all it doesn't work. Is there anyway that I can add the checkboxes but have the Protection Locked set to False? I've tested this by manually doing 3 of them and it works, but I have over 1000 boxes and no simple way to do them all at once.
Sub Addcheckboxes()
Dim Cell, LRow As Single
Dim chkbx As CheckBox
Dim MyLeft, MyTop, MyHeight, MyWidth As Double
Application.ScreenUpdating = False
LRow = ActiveSheet.Range("B" & Rows.Count).End(xlUp).Row
For Cell = 2 To LRow
If Cells(Cell, "B").Value <> "" Then
MyLeft = Cells(Cell, "A").Left
MyTop = Cells(Cell, "A").Top
MyHeight = Cells(Cell, "A").Height
MyWidth = Cells(Cell, "A").Width
ActiveSheet.CheckBoxes.Add(MyLeft, MyTop, MyWidth, MyHeight).Select
With Selection
.Caption = ""
.Value = xlOff
.Display3DShading = False
End With
End If
Next Cell
Application.ScreenUpdating = True
End Sub
Many thanks
Colin
Bookmarks