Hi,

I am using the following formula below, to enter the current date in excel once you click a cell within the range. Is it possible, once you click the cell and the date is entered automatically to lock the cell with a password so it can not be edited?
Formula is as follows: (thanks to TOM1977)

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myrange As Range
Set myrange = Union(Range("A1:A10"), Range("C1:C10"))
If Not Intersect(Target, myrange) Is Nothing Then
Target = Format(Now, "dd/mm/yyyy")
End If
End Sub

Thanks