Thread: date
View Single Post
  #5   Report Post  
mangesh_yadav
 
Posts: n/a
Default


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


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=380794