Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Lock the cell once enter the data
Hi,
I sthere anyway can you lock and unlock the cell once you enter the data? For example : If enter "Yes" to an greement on Cell C50. I want to lock the cell, so nobody can change the answer except myself. I am sure we can use helper cell to create somekind of formula which I am not sure what it is? Thanks to advise Dinesh |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Lock the cell once enter the data
All cells are set to "Locked" by default. But the Locked/Unlocked setting
does not mean anything until the sheet is protected. With the sheet protected, the locked cells cannot be changed. In your case, I would unlock all the cells on the sheet, then when any entry is made to any cell in some specific group of cells, I would Unprotect the sheet, set that one cell to Locked, and Protect the sheet again. You need to do this with VBA to prevent the user from changing any occupied cell. The following macro is an example: Private Sub Worksheet_Change(ByVal Target As Range) ActiveSheet.Unprotect Target.Locked = True ActiveSheet.Protect End Sub The macro will execute whenever ANY cell is changed. I'm sure that you want to restrict this action to a specific group or range of cells. Post back if you need more. HTH Otto "Dinesh" wrote in message ... Hi, I sthere anyway can you lock and unlock the cell once you enter the data? For example : If enter "Yes" to an greement on Cell C50. I want to lock the cell, so nobody can change the answer except myself. I am sure we can use helper cell to create somekind of formula which I am not sure what it is? Thanks to advise Dinesh |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Lock the cell once enter the data | Excel Worksheet Functions | |||
Macro question | Excel Worksheet Functions | |||
Enter data and display function result in same cell | Excel Discussion (Misc queries) | |||
Custom functions calculating time arguments Help Desperate | Excel Worksheet Functions | |||
Possible Lookup Table | Excel Worksheet Functions |