marreco
03-05-2012, 04:48 AM
Hi
I remember that code was written by OSWALDO-omp001 (Brazil).
I would like to adapts it more'm not consguindo.
If in a row of column 8 is written "Apple" and in a line of column 14 is written "Reseller".
So in line with colun 15 will be allowed to enter, otherwise the colun 15 is blocked.
Private Sub Worksheet_Change(ByVal Target As Range)
'Bloquear células com certa condição
If Target.Column <> 1 Then Exit Sub
If Target.Count > 1 Then Exit Sub
If Target.Value = "Cruzeiro do Sul" Then
Me.Unprotect
Cells(Target.Row, 15).Locked = True
Me.Protect
End If
End Sub
If someone could help me, I'm grateful.
Thank you!
I remember that code was written by OSWALDO-omp001 (Brazil).
I would like to adapts it more'm not consguindo.
If in a row of column 8 is written "Apple" and in a line of column 14 is written "Reseller".
So in line with colun 15 will be allowed to enter, otherwise the colun 15 is blocked.
Private Sub Worksheet_Change(ByVal Target As Range)
'Bloquear células com certa condição
If Target.Column <> 1 Then Exit Sub
If Target.Count > 1 Then Exit Sub
If Target.Value = "Cruzeiro do Sul" Then
Me.Unprotect
Cells(Target.Row, 15).Locked = True
Me.Protect
End If
End Sub
If someone could help me, I'm grateful.
Thank you!