mrherndon
asked on
Excel: Protect Cell After Data Entry
I have a spreadsheet with columns B and L. For any entry in columns B or L, I would like the cell to be protected as soon as input complete.
So, if a value is entered into B2, it should be protected. But when the user moves to B3, that cell should be still open for input while B2 is locked.
Can someone help?
So, if a value is entered into B2, it should be protected. But when the user moves to B3, that cell should be still open for input while B2 is locked.
Can someone help?
Using Worksheet Change Event is good in some cases but the downside is that you lose your Undo History.
So in this case, what happens if the users realises that they have entered the wrong value in B2? The Change Event locks it and they can't change it. They can't just do an Undo either because a macro has run.
Thanks
Rob H
So in this case, what happens if the users realises that they have entered the wrong value in B2? The Change Event locks it and they can't change it. They can't just do an Undo either because a macro has run.
Thanks
Rob H
ASKER
Thanks very much. I see where the sheet module example given could work well for me.
Question: how best to combine two different subroutines on the same sheet module? I have another in place now, which I use to control point of focus. How best to combine the below with the proposed solution?
Question: how best to combine two different subroutines on the same sheet module? I have another in place now, which I use to control point of focus. How best to combine the below with the proposed solution?
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count = 1 Then
Application.EnableEvents = False
If Target.Column = 1 Then
Target.Offset(0, 1).Value = VBA.Now
Target.Offset(0, 10).Select
ElseIf Target.Column = 11 Then
Target.Offset(1, -10).Select
End If
Application.EnableEvents = True
End If
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hello,
I have spreadsheet with range of A3:AN219, i would like the cell protected as soon as input complete.
I tried above solution but i did not get any solution for my problem.
Please help me on this
I have spreadsheet with range of A3:AN219, i would like the cell protected as soon as input complete.
I tried above solution but i did not get any solution for my problem.
Please help me on this
Open in new window
Kris