Thread: date
View Single Post
  #5  
Old 06-22-2005, 06:03 AM
mangesh_yadav mangesh_yadav is offline
Forum Guru
 
Join Date: 10 Jun 2004
Location: India
Posts: 1,068
mangesh_yadav is becoming part of the community
A line added for the 4th column:

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A:A")) Is Nothing Then
With Target
.Offset(0, 1).Value = Format(Date, "dd mmm yyyy")
.Offset(0, 2).Value = Format(Time, "h")
.Offset(0, 3).Value = .Offset(0, 3).Value + 1 ' this is new line
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub


Mangesh
Reply With Quote