Good night,
I'm a beginner in Excel and would be very grateful if someone can help me ...
I would like that after pressing the Enter key, there would be the blocking of cells for editing ...
In other words, the idea is that when inserting data in a cell, when pressing the Enter key, that cell is blocked for editing (the other cells must remain unlocked until the Enter key is clicked on them) and that eventual changes are allowed only after unlocking with password.
I am currently using the code below, but the blocking of the cells occurs immediately after entering data and I need the blocking to occur only after pressing the Enter key.
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Unprotect Password:
Target.Locked = True
ActiveSheet.Protect Password: = "MyPassword"
End Sub
Thank you for your help
Bookmarks