Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional Formatting Tab Locked | Excel Discussion (Misc queries) | |||
Locked worksheet & hyperlinks (w/ select locked cells unchecked) | Excel Discussion (Misc queries) | |||
Put comments on a locked spreadsheet even though cells not locked | Excel Worksheet Functions | |||
I want the macros to be locked up when cells are locked up. | Excel Programming | |||
conditional locked cell? | Excel Programming |