Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.setup
|
|||
|
|||
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
Posted to microsoft.public.excel.setup
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sheet Information - Is sheet protected? | Excel Discussion (Misc queries) | |||
Writing formulas between sheet | Excel Discussion (Misc queries) | |||
writing macros in excel sheet | Excel Worksheet Functions | |||
Protected sheet to unprotected sheet | Excel Worksheet Functions | |||
protected sheet | Excel Discussion (Misc queries) |