Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default 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
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
Entering dates into cells as mm/yy or yy dabarr Excel Discussion (Misc queries) 4 September 1st 07 06:18 PM
I have lock a wookbook but one cell does not want to lock it Mimi Excel Discussion (Misc queries) 2 January 21st 07 10:59 PM
I have lock a wookbook but one cell does not want to lock it Mimi Excel Discussion (Misc queries) 1 January 21st 07 09:44 AM
Entering text in cells Hallway Excel Discussion (Misc queries) 4 September 26th 06 04:49 AM
Entering zeros in cells jay_perry01 Excel Discussion (Misc queries) 1 January 16th 06 07:25 PM


All times are GMT +1. The time now is 03:39 PM.

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"