![]() |
How to make a particular cell alone as Read-only
All,
I need to make programatically some cells in Excel sheet as Read-only, So, that user should not be allowed to edit the contents of that particular cells, where as users can edit the other cells in the same sheet. I'm not intersted in making complete sheet as read-only. Is there any way i can acheive the above requirements. Thanks, S.Annamalai |
How to make a particular cell alone as Read-only
On Apr 16, 7:15*am, Annamalai.S
wrote: All, * *I need to make programatically some cells in Excel sheet as Read-only, So, that user should not be allowed to edit the contents of that particular cells, where as users can edit the other cells in the same sheet. I'm not intersted in making complete sheet as read-only. Is there any way i can acheive the above requirements. Thanks, S.Annamalai Try this: I used Sheet1 and D3:D7 as my protected range, yours will be different. I have added an If clause in case your sheet is already protected. Sub ProtectCells() With Worksheets("Sheet1") If Sheet1.ProtectContents Then .Unprotect ("password") End If .Cells.Locked = False .Range("D3:D7").Locked = True .Protect ("your password here") End With End Sub |
All times are GMT +1. The time now is 09:51 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com