Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This might be a duplicate post but not sure anyone will see my other one
which is in a reply. I'm trying to allow users of a protected sheet to delete a duplicate row. When protection was applied thru the menu, "Allow User To Delete Row" was checked. Problem: when this code runs and I right click the pink dup row number, "Delete" is not enabled. Please help! If whichsheet = "ResData" Then ThisWorkbook.Sheets("ResData").Unprotect ("myPw") 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 ("MyPw"), AllowDeletingRows:=True |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is what I guessed in the other post.
Is rw a row in a range--less than all the columns? maybe rw.entirerow.locked = false Perico wrote: This might be a duplicate post but not sure anyone will see my other one which is in a reply. I'm trying to allow users of a protected sheet to delete a duplicate row. When protection was applied thru the menu, "Allow User To Delete Row" was checked. Problem: when this code runs and I right click the pink dup row number, "Delete" is not enabled. Please help! If whichsheet = "ResData" Then ThisWorkbook.Sheets("ResData").Unprotect ("myPw") 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 ("MyPw"), AllowDeletingRows:=True -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
protect unprotect sheet vba | Excel Programming | |||
Unprotect and Protect sheet within macro | Excel Programming | |||
Excel VBA-Protect and unprotect sheet with BVA | Excel Programming | |||
Protect/unprotect sheet with password with VBA? | Excel Programming | |||
VBA code - protect and unprotect a sheet | Excel Programming |