First of all you have to make sure that all the cells in which you will be entering data are unlocked. Then you have to protect the worksheet, with or without a password. If you want to use a password, change
to
ActiveSheet.Unprotect Password:="password"
Do the same with
Change "password" to whatever password you want to use. Enter the data in each column making sure that you enter the data in column D last because entry in column D is what triggers the macro. Place this macro in the worksheet code module:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("D:D")) Is Nothing Then Exit Sub
ActiveSheet.Unprotect
Target.EntireRow.Locked = True
ActiveSheet.Protect
End Sub
Bookmarks