ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help with sheet protection (https://www.excelbanter.com/excel-programming/271410-re-help-sheet-protection.html)

PigzleFly

Help with sheet protection
 
I can answer my own question - sorry everyone - just seen a typing error in
the last line. Engage brain before selecting 'post' !!

"PigzleFly" wrote in message
...
I wanted to toggle sheet protection off and on, but when using the

following
code

ActiveSheet.Protect DrawingObjects:=True, Contents:=True,

Scenarios:=True
ActiveSheet.EnableSelection = x1UnlockedCells

which I gleaned from a recorded macro. I still end up with a protected

sheet
that allows access to locked cells. What am I missing?

Sorry if this is a bit simple, but just starting with VBA

Thanks!









All times are GMT +1. The time now is 10:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com