ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Protecting Cells (https://www.excelbanter.com/excel-programming/323957-protecting-cells.html)

Teresa

Protecting Cells
 
Hi - how do I protect a worksheet
but allow users to edit a range of cells:

a1:a23, b4:b7,l2

Thank You

jonjo

Protecting Cells
 
Hallo,

ActiveSheet.Cells.Locked = True
Range("A1:A23,B1,B1,B4:B7,B1,L2").Locked = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

Greetings jonjo

"teresa" wrote:

Hi - how do I protect a worksheet
but allow users to edit a range of cells:

a1:a23, b4:b7,l2

Thank You


Tom Ogilvy

Protecting Cells
 
Range("a1:a23,B4:B7,L2").Locked = False

Must be done when the worksheet is unprotected

or do it manually.

--
Regards,
Tom Ogilvy

"teresa" wrote in message
...
Hi - how do I protect a worksheet
but allow users to edit a range of cells:

a1:a23, b4:b7,l2

Thank You





All times are GMT +1. The time now is 09:28 PM.

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