View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vergel Adriano Vergel Adriano is offline
external usenet poster
 
Posts: 857
Default worksheet change event auto populate

The code below will put the username in column J and date/time stamp in
column K of the modified rows.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Integer
Application.EnableEvents = False
For i = 0 To Target.Rows.Count - 1
Me.Cells(Target.Row + i, 10).Value = Environ("username")
Me.Cells(Target.Row + i, 11).Value = Now
Next i
Application.EnableEvents = True
End Sub


--
Hope that helps.

Vergel Adriano


"Nelly" wrote:

-Hello,

I would like to add a worksheet change event that will populate specific
cells with the current system date and user name when the corresponding row
is updated. There are two of us tracking a large amount of data and I want to
be able to know who changed data in that row and on what date. I think this
is pretty easy but I am still a novice.

Thank you,
Nelly