View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.setup
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Allow only writing in a protected Sheet

First you select all cells you want to be able to enter data in and Format
to Unlocked.

Then add this event code to the sheet module.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 1 Then 'edit the 1 to your column number
Me.Unprotect Password:="justme"

With Target
If .Value < "" Then
.Locked = True
End If
End With
End If

enditall:
Me.Protect Password:="justme"
Application.EnableEvents = True
End Sub


Gord Dibben MS Excel MVP

On Mon, 5 Jan 2009 11:45:02 -0800, Piruzzi
wrote:

Hello,
Can anyone tell me if its possible to allow only writing in a cell when a
sheet is protected?
For Example: I have a column named "Names" and in this Column is allowed to
write the persons name and then you can't delete it, or modified it, unless
you have the password to unprotect.
Is this possible?
I aprecciate the help.

Thanks in advance
Piruzzi