Jmuniz_Vargas
New Member
- Joined
- May 21, 2013
- Messages
- 6
Good morning to all,
I wish to delete values in editable rows in a protected excel sheet. I have the following code event
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Unprotect Password:="avalon"
If Target.Column = 2 Then
Application.EnableEvents = False
Cells(Target.Row, 5).Value = Date + Time
Application.EnableEvents = True
End If
ActiveSheet.Protect Password:="avalon"
End Sub
The idea is when I delete data in editable rows located in column 'B' at the same time, in column 'E'(where is located an stamp time and, also, they are protected) to delete the related cell to clean up the data from those columns ('B'and 'E'). I hope to be clear, if not let me know to try to clarify my need to discover the proper code based on events.
Thanks in advance.
I wish to delete values in editable rows in a protected excel sheet. I have the following code event
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Unprotect Password:="avalon"
If Target.Column = 2 Then
Application.EnableEvents = False
Cells(Target.Row, 5).Value = Date + Time
Application.EnableEvents = True
End If
ActiveSheet.Protect Password:="avalon"
End Sub
The idea is when I delete data in editable rows located in column 'B' at the same time, in column 'E'(where is located an stamp time and, also, they are protected) to delete the related cell to clean up the data from those columns ('B'and 'E'). I hope to be clear, if not let me know to try to clarify my need to discover the proper code based on events.
Thanks in advance.