One way:
Put this in your worksheet code module (right-click the worksheet tab
and choose View Code):
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Const sPWORD As String = "drowssap"
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("A2:A10"), .Cells) Is Nothing Then
Application.EnableEvents = False
.Parent.Unprotect Password:=sPWORD
With .Offset(0, 1)
.NumberFormat = "dd mmm yyyy hh:mm:ss"
.Value = Now
End With
.Locked = True
.Parent.Protect Password:=sPWORD
Application.EnableEvents = True
End If
End With
End Sub
See
http://www.mcgimpsey.com/excel/timestamp.html
for additional ideas.
In article ,
"jiwolf" wrote:
Anybody know how to time stamp a file? I need to execute a macro to insert
the date and time into a cell ( say cell A1). This cell has then to be
locked until a password is entered.
Any help greatly appreciated
Pete