Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello
I added a check box using the control tool box. Then in the sheet code I added the following Private Sub CheckBox1_Click() Rows("1:68").Select ActiveSheet.Protect "pass" ActiveSheet.Unprotect "pass" End Sub THis is what Im trying to do when the check box is selected or checked then rows 1 thru 68 will be protected else if the checked box is uncheck sheet is unprotected thanks in advance |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I change default check boxes on protect sheet? | Excel Discussion (Misc queries) | |||
How do I copy a check box result from Worksheet A to Worksheet B? | Excel Worksheet Functions | |||
How can I protect a worksheet but still use ActiveX check-boxes? | Excel Discussion (Misc queries) | |||
How can I protect a cell and keep the spell check working? | Excel Discussion (Misc queries) | |||
How to protect a worksheet from being copied to another worksheet | Excel Discussion (Misc queries) |