Trying to password protect sheet1 by clicking on the check box. I
recorded a macro to protect and unprotect. I double clicked the
check box control and put an if,then statement in that would call
the aforemetioned macros; however, it's not working. What am I doing
wrong?
Private Sub CheckBox1_Click()
Dim LinkedCell As Boolean
'LinkedCell is a named range for A3 - A3 is where the
'checkbox result is stored
If LinkedCell = 1 Then
Call Protect
Else
Call Unprotect
End If
End Sub
*************
Here are the protect, unprotect macros (in module 1)
Sub Protect()
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
End Sub
Sub Unprotect()
ActiveSheet.Unprotect
End Sub
**************