Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Conditional Locked Cells

Dear All,

I have a sheet in which 3 columns are for data feeding and i need that
if any body feed any item in non blank cells then it will be locked
and he couldn't alter if he fed the data once.

await for early and positive response.

Regards

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Conditional Locked Cells

Hi,

Firstly select A1 - A100 and then:-
Format|cells|Protection and remove the Locked checkmark.
Then right click the sheet tab, view code and paste this in:-

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A1:A100")) Is Nothing Then ' Change to
suit
Application.EnableEvents = False
ActiveSheet.Unprotect Password:="mypass"
Target.Locked = True
ActiveSheet.Protect Password:="mypass"
Application.EnableEvents = True
End If
End Sub

Changing a cell in the range A1 to A100 causes it to become locked. You can
change this range to suit

Mike

"shaqil" wrote:

Dear All,

I have a sheet in which 3 columns are for data feeding and i need that
if any body feed any item in non blank cells then it will be locked
and he couldn't alter if he fed the data once.

await for early and positive response.

Regards


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
Conditional Formatting Tab Locked WOODY Excel Discussion (Misc queries) 2 October 6th 09 04:36 PM
Locked worksheet & hyperlinks (w/ select locked cells unchecked) dgold82 Excel Discussion (Misc queries) 1 July 10th 09 09:42 PM
Put comments on a locked spreadsheet even though cells not locked RDP Excel Worksheet Functions 1 September 11th 05 11:59 PM
I want the macros to be locked up when cells are locked up. Ed Excel Programming 6 February 20th 05 01:31 AM
conditional locked cell? choice[_2_] Excel Programming 1 September 10th 04 01:18 AM


All times are GMT +1. The time now is 04:26 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"