Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel locking cell based on value in another cell
Hi all
My code locks another cell based on value in another cell. I got it working just for 1 row but i would like to do it for the subsequent rows (E10, E11, E12, E13...)... any help?? Private Sub Worksheet_Change(ByVal Target As Range) If [E9] = "A" Then ActiveSheet.Unprotect ("") ActiveSheet.Range("G9:K9").Locked = True ActiveSheet.Protect ("") Else ActiveSheet.Unprotect ("") ActiveSheet.Range("G9:K9").Locked = False ActiveSheet.Protect ("") End If End Sub Thanks in advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel locking cell based on value in another cell
Check one of your other threads.
Kelson wrote: Hi all My code locks another cell based on value in another cell. I got it working just for 1 row but i would like to do it for the subsequent rows (E10, E11, E12, E13...)... any help?? Private Sub Worksheet_Change(ByVal Target As Range) If [E9] = "A" Then ActiveSheet.Unprotect ("") ActiveSheet.Range("G9:K9").Locked = True ActiveSheet.Protect ("") Else ActiveSheet.Unprotect ("") ActiveSheet.Range("G9:K9").Locked = False ActiveSheet.Protect ("") End If End Sub Thanks in advance -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Locking a cell based on a cells content | Excel Discussion (Misc queries) | |||
Cell locking based on domain user | Excel Worksheet Functions | |||
Locking/Unlocking based on another cell value | Excel Worksheet Functions | |||
Excel Locking cells based on value in another cell | Excel Discussion (Misc queries) | |||
Locking other cells based on values in a cell. | Excel Programming |