Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Need way to protect cell after data entry

We have several logs that various personnel enter
information into. What I would like to do is protect a
cell only after data is entered into to prevent the data
from getting changed at a later point without
authorization. Is there a simple way to do this without
creating custom forms? Thanks.

Ken
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Need way to protect cell after data entry

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
ActiveSheet.Unprotect
Target.Locked = True
ActiveSheet.Protect
End Sub

Try this event in a sheet module
First change locked to false to some cells or all cells in the worksheet
select the cells and press Ctrl-1 and uncheck locked on the
protection tab

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Ken" wrote in message ...
We have several logs that various personnel enter
information into. What I would like to do is protect a
cell only after data is entered into to prevent the data
from getting changed at a later point without
authorization. Is there a simple way to do this without
creating custom forms? Thanks.

Ken



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Need way to protect cell after data entry

I ended up combining both methods and adding two lines of
my own to protect only the active cell. It works
perfectly. thanks again.

-----Original Message-----
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
ActiveSheet.Unprotect
Target.Locked = True
ActiveSheet.Protect
End Sub

Try this event in a sheet module
First change locked to false to some cells or all cells

in the worksheet
select the cells and press Ctrl-1 and uncheck locked on

the
protection tab

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Ken" wrote in message

...
We have several logs that various personnel enter
information into. What I would like to do is protect a
cell only after data is entered into to prevent the data
from getting changed at a later point without
authorization. Is there a simple way to do this without
creating custom forms? Thanks.

Ken



.

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
How do I protect a text box, but allow entry of data Bob Excel Worksheet Functions 0 October 18th 07 08:10 PM
Protect Data after entry boatsc Excel Discussion (Misc queries) 12 December 9th 06 05:55 PM
Protect IF statement AND allow data entry stilton Excel Worksheet Functions 1 July 5th 06 11:10 PM
Protect IF statement AND allow data entry stilton Excel Worksheet Functions 0 July 5th 06 09:53 PM
protect formatting but allow data entry brucenikkm Excel Discussion (Misc queries) 4 September 16th 05 03:43 PM


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