Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
To lock a cell/cells after entering the value
I am doing a time sheet for my staff to allow them enter "Time in" and "time
out" in the begining and end of the working day. My question is ; is there any way to do so they can only do one entery on the cell and not be able to change it later? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
To lock a cell/cells after entering the value
1. First un-protect the sheet
2. Next un-protect the cells: Format Cells... Protection and clear the Locked checkbox 3. Next protect the sheet: Tools Protection Protect Sheet and have only select unlocked cells checked 4. Put the following event macro in the worksheet code area: Private Sub Worksheet_Change(ByVal Target As Range) Set t = Target ActiveSheet.Unprotect t.Locked = True t.FormulaHidden = False ActiveSheet.Protect Contents:=True ActiveSheet.Protect End Sub Once a value has been entered in the sheet, its value will be locked -- Gary's Student - gsnu200766 "The learner" wrote: I am doing a time sheet for my staff to allow them enter "Time in" and "time out" in the begining and end of the working day. My question is ; is there any way to do so they can only do one entery on the cell and not be able to change it later? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Entering dates into cells as mm/yy or yy | Excel Discussion (Misc queries) | |||
I have lock a wookbook but one cell does not want to lock it | Excel Discussion (Misc queries) | |||
I have lock a wookbook but one cell does not want to lock it | Excel Discussion (Misc queries) | |||
Entering text in cells | Excel Discussion (Misc queries) | |||
Entering zeros in cells | Excel Discussion (Misc queries) |