I have a macro that will delete rows in a protected sheet, but...
Posted on 2014-08-07
I use this code to allow users to delete rows in a protected worksheet.
Dim Ret As Range, Cl As Range
On Error Resume Next
Set Ret = Application.InputBox("Please select the Cells", "Delete Rows", Type:=8)
On Error GoTo 0
If Not Ret Is Nothing Then Ret.EntireRow.Delete
Is there a way to exempt one particular row (or a range of rows) from this? In other words, allow users of a protected sheet to run the macro on all rows EXCEPT specific rows that I don't ever want deleted?
(Disclaimer - I grabbed this code off the internet, and am only vaguely aware of what it means.)