hello!
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)
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
.
.
Rows("1000:1000").Select
Then
ActiveSheet.Unprotect
Then if
ActiveCell.Row.delete
ActiveSheet.Protect
End sub
Your thoughts,
Thanks!
Bookmarks