Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
-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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Worksheet_Change(ByVal Target As Range)
n = Target.Row Application.EnableEvents = False Cells(n, 1).Value = Environ("UserName") Cells(n, 2).Value = Now() Application.EnableEvents = True End Sub will record the username and date in columns A&B of the changed row. NOTE: this is event code and goes in worksheet code area. -- Gary''s Student gsnu200711 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to auto populate an invoice from data in an existing worksheet | Excel Discussion (Misc queries) | |||
Worksheet formula - auto populate | Excel Worksheet Functions | |||
Auto populate one worksheet from other worksheets | Excel Worksheet Functions | |||
I want to conditionally auto-populate a summary worksheet | Excel Discussion (Misc queries) |