Sheet Protection Bug?

G

Guest

Excel 2003: I have a column where cells are locked on a protected sheet and
protection is turned on. In turning on protection, Excel offers checkbox
options, such as "Allow users to detlete rows." The problem is When the user
tries to delete a row they get a message that "cannot delete cells that are
locked." This is a catch 22, because to get the benefits of sheet
protection, you lock cells. And if you check "Allow users to detlete rows."
in creating the password, but you can't delete a row containing protected
cells, what good is that checkbox? Is this a bug?
Thank you.
 
G

Guest

While it seems odd I would say it is not a bug. Would it be any more correct
to allow you to delete locked and protected cells? How about deleting a
header row or a row with grand totals in it? It seems that there is no right
answer to that question. To me the key is understanding the limitations and
working around them.
 
G

Guest

Dave, where am I going wrong in this code snippet? After it runs I still am
unable to delete the row (rw):
If whichsheet = "ResData" Then
ThisWorkbook.Sheets("ResData").Unprotect ("pduct")
Intersect(Range("resRecNum"), rw).Interior.ColorIndex = 7
'pink

rw.Locked = False

Intersect(Range("resRecNum"), rw).Offset(-1,
0).Interior.ColorIndex = 50 'green
Intersect(Range("resMeasure"), rw) = "DUP"

'rw.Offset(-1).Locked = False

ThisWorkbook.Sheets("ResData").Protect ("pduct"),
AllowDeletingRows:=True
 
D

Dave Peterson

Is rw a row in a range--less than all the columns?

maybe

rw.entirerow.locked = false

would help
 
G

Guest

I agree. It was simply a matter of writing some code to unlock the cells in
the target row. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top