Hello,

I created a new workbook, selected all the cells, and UNCHECKED the locked option for all of them. Next, I protected the sheet, using as password

Password

then, I put this code in the Sheet's module.

Private Sub Worksheet_Change(ByVal Target As Range)

ActiveSheet.Unprotect "Password"

Target.Locked = True

ActiveSheet.Protect "Password"

End Sub

Then, everytime I change a cell, it becomes locked. This works fine, until I share the workbook and start tracking changes. When I do this, the sheet no longer auto locks and gives me error codes. I try to go back into the VBA but it says the project is unviewable, and I have to exit out.

Can someone provide code that allows for the sheet to autolock cells after data entry while tracking changes? I want to know who inputted the data into the cell, a feature that tracking changes shows, while autolocking the cell so that data cannot be changed.