View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default unlock cell dependent on value entered in another cell

Hi,

You don't provide too much to go on. This unlocks the active row if you
enter 99 in column A

Right click you sheet tab, view code and paste this in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A:A")) Is Nothing Then
If Target.Value = 99 Then
Application.EnableEvents = False
ActiveSheet.Unprotect Password:="MyPass"
Rows(Target.Row).Locked = False
ActiveSheet.Protect Password:="MyPass"
Application.EnableEvents = True
End If
End If
End Sub

Mike

"johnsail" wrote:

Hi
I have a sheet where all cells are locked EXCEPT for one column.
For each row I then require that users enter a value in the one unlocked
cell and that this unlocks other cell on the same row.
Can this be done on a row by row basis?
Thanks