Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
locked cell not locked
Hello
Below is my code Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$N$11" Then ActiveSheet.Protect "pass" Else If Target.Address = "$H$41" Then ActiveSheet.Unprotect "pass" This is what I want to do- when person completes cell N11 active sheet is protected - until all cells are completed to H 41. when person completes H 41 active sheet is unprotected. the above code works, BUT it does not recognized AB 11 as a locked cell eventhough the cell is formatted as locked. thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
locked cell not locked
To Protect a cell, try something like this first:
Sub lock_um() ActiveSheet.Unprotect Range("A1").Locked = True ActiveSheet.Protect End Sub -- Gary''s Student - gsnu200820 "Wanna Learn" wrote: Hello Below is my code Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$N$11" Then ActiveSheet.Protect "pass" Else If Target.Address = "$H$41" Then ActiveSheet.Unprotect "pass" This is what I want to do- when person completes cell N11 active sheet is protected - until all cells are completed to H 41. when person completes H 41 active sheet is unprotected. the above code works, BUT it does not recognized AB 11 as a locked cell eventhough the cell is formatted as locked. thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Locked Cell Values?? | Excel Discussion (Misc queries) | |||
Cell shading locked? | Excel Discussion (Misc queries) | |||
Formula in Cell changes even if it's locked | Excel Discussion (Misc queries) | |||
run a macro in a locked cell | Excel Discussion (Misc queries) | |||
Put comments on a locked spreadsheet even though cells not locked | Excel Worksheet Functions |