Please need help to solve the programming :
unprotect sheet if the cell is selected and protect sheet again after the run vba completed.
The column 2 is for the input "IN" and protect the column 4, but if I insert command "Sheet1.Unprotect" then the Vba won't work.
Quote:
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
If .Cells.count = 1 Then If .column = 2 And .Row > 1 And .Value = "In" Then
.Offset(, 2).Value = Format(Now(), "dd/mm hh:mm:ss")
End If
If .column = 3 And .Row > 1 And .Value = "Out" Then
.Offset(, 2).Value = Format(Now(), "dd/mm hh:mm:ss")
End If
End If
End With
End Sub
|
Any help will be very much appreciated.