A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Setting up and Configuration
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Allow only writing in a protected Sheet



 
 
Thread Tools Display Modes
  #1  
Old January 5th, 2009, 07:45 PM posted to microsoft.public.excel.setup
Piruzzi
external usenet poster
 
Posts: 1
Default Allow only writing in a protected Sheet

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
  #2  
Old January 5th, 2009, 11:59 PM posted to microsoft.public.excel.setup
Gord Dibben
external usenet poster
 
Posts: 20,252
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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:41 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.