View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sean Sean is offline
external usenet poster
 
Posts: 454
Default Display a Date when a cell is Modified

Thanks Mike

I've changed to below and it works. Only issue now is that I have the
sheet protected (except for D9:D144) but it doesn't seem to work when
protected

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
ActiveSheet.Unprotect Password:="1234"
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("D9:D144"), .Cells) Is Nothing Then
Application.EnableEvents = False
With Me.Cells(24, 10)
.NumberFormat = "dd-mmm-yy at h:mm"
.Value = Now
End With
ActiveSheet.Protect Password:="1234"
Application.EnableEvents = True
End If
End With
End Sub