Forum Discussion
Carl_Stephens
Sep 10, 2020Copper Contributor
VBA PROTECT SHEET
Hello All, Apologies if this has been answered previously. The below code does not work when I protect the sheet....and I’ve tried adding a password unprotect and protect to the code but cannot see...
mtarler
Sep 10, 2020Silver Contributor
Carl_Stephens Just unprotect at the beginning and protect at the end:
...
Set wsData = Worksheets("1. MAPS List")
Set wsDest = Worksheets("2. Joiners List")
wsDATA.unprotect()
wsDest.unprotect()
...
wsDATA.protect()
wsDest.protect()
End Sub
If you have a password you use that will have to be added to each statement.
- Carl_StephensSep 10, 2020Copper ContributorThank you. I was using a different protect code and noted that the wsData.unprotect worked perfect. Thank you again.