Looking for the following code:
sheet is currently locked (enabled for locked cell selection).
VBA detects if any whole row(s) say 21, 22 are selected and automatically unprotects sheet.
THEN:
if these exact rows are deleted.. sheet automatically protects again.
If the user deselects these rows.. sheet protects again.
(this is design to perform specific row deletion)
very crudely:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
IF Rows("1:1").Select AND/OR Rows("2:2").Select AND/OR Rows("3:3").Select then
ActiveSheet.Unprotect
End If
ActiveCell.Row.Delete
ActiveSheet.Protect
End Sub