How do you combine the following 2 VBA code for the same spreadsheet:
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Unprotect "123"
Target.Locked = True
ActiveSheet.Protect "123"
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Cell As Range
For Each Cell In Target
With Cell
If .Column = 1 Then
Cells(.Row, 2).Value = Date '+ Time
End If
End With
Next Cell
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Unprotect "123"
Target.Locked = True
ActiveSheet.Protect "123"
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Cell As Range
For Each Cell In Target
With Cell
If .Column = 1 Then
Cells(.Row, 2).Value = Date '+ Time
End If
End With
Next Cell
End Sub