Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 103
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,090
Default 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
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
Lock the cell once enter the data Dinesh Excel Worksheet Functions 0 August 11th 06 03:11 AM
Macro question Chris Excel Worksheet Functions 12 July 7th 06 01:23 AM
Enter data and display function result in same cell ChrisR Excel Discussion (Misc queries) 1 June 21st 06 12:15 AM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM


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