View Single Post
  #17   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jennifer[_11_] Jennifer[_11_] is offline
external usenet poster
 
Posts: 1
Default Lock Cell After Data is Entered on Particular Cell

On Sunday, June 24, 2012 at 10:08:06 AM UTC-4, Gord Dibben wrote:
First...........select all cells on sheet and format them to unlocked.

Add this event code to the worksheet module.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 3 Then
ActiveSheet.Unprotect Password:="justme"
n = Target.Row
If Me.Range("C" & n).Value < "" Then
Me.Range("C" & n).Locked = True
End If
End If
enditall:
ActiveSheet.Protect Password:="justme"
Application.EnableEvents = True
End Sub

When you enter a value in column C that cell will become locked for
editing.


Gord


On Sun, 24 Jun 2012 12:00:21 +0000, Moideen
wrote:


We are maintaing an excel sheet for expense details, After Entering the
data on Amount Coloumn Need to Lock The Amount Coloumn with Password.
Please help me.

Coloumn 1 Coloumn 2 Coloumn 3

Date Item Name Amount


Gord,

If you can, I need similar, but slightly different help. I need to lock cells in a specific column, but only after the value of the column has been changed to a specific value.

We have a buyer sheet that we've been having issues with buyers changing their minds after they've already adjusted an item status from "Hold" to "Ready to Use" and we would like to be able to lock that column once the value is changed to "Ready to Use" but editable prior to that change.

Is there someway of doing that?

-Jennifer