Hello to all,
I am trying to find an solution in Marco to lock an complete row if on column G:G, for an example is a text like "abcd" with pasword: <xxx> and if is text like "qwerty" with password <yyy>.
It is possible?
I have tryed with the attached VBA code but looks like is nor working
[VBA]Private Sub Worksheet_Calculate()
Dim LR As Long, i As Long
LR = Range("G" & Rows.Count).End(xlUp).Row
Me.Unprotect
For i = 1 To LR
With Range("G" & i)
If .Value = "abcd" Then .EntireRow.Locked = True
End With
Next i
Me.Protect
End Sub
[/VBA]
Regard.