notuserfriendly
Programmer
Hi, I'm wondering why my sheet behaves strangely. I'm trying to protect some parts of the sheet.
There is one problem though. After running this code the range is locked. It happens after .ClearFormats is run.
I've been trying to change it with .Locked = False for the same range but it's no use. Any ideas?
There is one problem though. After running this code the range is locked. It happens after .ClearFormats is run.
I've been trying to change it with .Locked = False for the same range but it's no use. Any ideas?
Code:
With Range(ws.Cells(startRow, col1), ws.Cells(endRow, col2))
.ClearFormats
.ClearComments
.ClearContents
End With