Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make an execl cell A3 read-only based on A4? Jerome Excel Discussion (Misc queries) 3 September 10th 09 09:39 PM
How do I make read-only file vij Excel Discussion (Misc queries) 1 July 17th 09 02:04 PM
How to make a File READ ONLY Allan P. London, CPA Excel Programming 1 September 14th 06 08:10 PM
how to make cell read only ndalal Excel Programming 11 May 10th 06 09:16 PM


All times are GMT +1. The time now is 11:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"