View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
curlydave curlydave is offline
external usenet poster
 
Posts: 206
Default protect worksheet with check box

Try this

Private Sub CheckBox1_Click()

With Worksheets("Sheet1")
ActiveSheet.Unprotect "pass"
Cells.Locked = False
End With

If CheckBox1 = True Then
Rows("1:68").Locked = True
ActiveSheet.Protect "pass"
Else: Rows("1:68").Locked = True
End If

End Sub