Hi,
The below code works for column A and B. When I enter data in any row in column A (lets say A1), the adjacent row in column B i.e., B1 will take a times stamp and then every row having data in it (i.e., A1 and B1 in this example) will get locked.
What I am looking for is the code which do the same thing but for column C and column D also.
Below is the code which i m using in Worksheet module :
Can someone help?![]()
Option Explicit Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Column > 2 Then Exit Sub 'only works in Columns A & B With ActiveSheet .Unprotect If Target.Value > "" Then Target.Locked = True .Protect End With End Sub
Thanks in advance.
Aleen
Bookmarks