Thread: Macro - Help
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Jaleel Jaleel is offline
external usenet poster
 
Posts: 187
Default Macro - Help

Gary,

Thank you very much. This is exactly what I wanted.

Cheers,

Jaleel

"Gary Keramidas" wrote:

there are ways around it if people know what they're doing, but you can try
something like this. test it on some test data.

select all of the cells, click format , cells, and uncheck locked on the
protection tab. or select whichever cells you want to work with.

then paste the code on the relevant worksheet's code page in the vb editor.
change the password to whatever you want.


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count = 1 And Target "" Then
ActiveSheet.Unprotect Password:="123"
Target.Locked = True
ActiveSheet.Protect Password:="123"
End If
End Sub



--


Gary Keramidas
Excel 2003


"Jaleel" wrote in message
...
Hi,

I don't know whether it is possible. Still I am asking the experts. My
requirement is this.

In a blank worksheet, if anything is typed in a cell, it must become like
protected. Means it cannot be deleted or edited or retyped. This is
required for the whole worksheet.

Can anybody help?

Thanks & Regards,

Jaleel


.