Forum Discussion
Pam Laidler
Oct 05, 2018Copper Contributor
PROTECTING CELLS BUT ALLOW COPYING OF ROWS
Hi Gurus I have a spreadsheet where I have protected the sheet with password, said to allow select locked and also insert rows, but I want users to be able to copy rows and then insert with the form...
Pam Laidler
Oct 05, 2018Copper Contributor
Hi Lorenzo
Does this mean you still need to enter the password to allow the unprotect? As I don't want to allow users to do this.
Lorenzo Kim
Oct 05, 2018Bronze Contributor
I am not an expert on this, but I'd use this method in my work.
try this first on a test file. Always make a backup of your work.
if this work after several tests, then give it a go.
press ALT F11
and in ThisWorkbook module
place the codes below
Private Sub Workbook_Open() 'change your password to suit
Sheet1.UnProtect Password:="your password", UserInterFaceOnly:=True 'assuming that Sheet1
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheet1.Protect Password:="your password", UserInterFaceOnly:=True
End Sub
- Pam LaidlerOct 05, 2018Copper ContributorI'll try that - thank you.
I tried the name box method but that didn't work.- Lorenzo KimOct 05, 2018Bronze ContributorI think in the workbook open you should add a prompt for password ....
- Lorenzo KimOct 05, 2018Bronze Contributor
the set back for this is it will always be unprotected when opened...
rendering the protection rather useless
- Pam LaidlerOct 05, 2018Copper ContributorOh!- that won't work then, as I need to protect the formulas at all times, but just allow for copying a row and inserting it, within the same worksheet.
- Lorenzo KimOct 05, 2018Bronze Contributorin that case, I'll google for that provision, if I find one I'll let you know