ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Locking cells (https://www.excelbanter.com/excel-programming/347255-locking-cells.html)

Patrick Simonds

Locking cells
 
I use the code below to lock worksheets in my workbook and it works fine,
but now I need et to prevent selection of locked cells. I tried adding ,
EnableSelection = xlUnlockedCells to the end of the statement but I get an
Expected: Named parameter error

SH.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True



Patrick Simonds

Locking cells
 
Never mind I figured it out. Had to add a new line SH.EnableSelection =
xlUnlockedCells


"Patrick Simonds" wrote in message
...
I use the code below to lock worksheets in my workbook and it works fine,
but now I need et to prevent selection of locked cells. I tried adding ,
EnableSelection = xlUnlockedCells to the end of the statement but I get an
Expected: Named parameter error

SH.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True





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

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