View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Capture user name

sorry had a misspelling

Cells(n, "U").Value = Environ("Username") & " " & Format(Now, "mm-dd-yyyy")

--


Gary


"Kamran" wrote in message
...
Hello,
I have this statement in macro that insert the date in a cell anytime
someone makes a change within a given row:

If Intersect(Target, Columns("G:R")) Is Nothing Then
Exit Sub
End If
n = Target.Row
Cells(n, "U").Value = Format(Now, "mm-dd-yyyy")
End Sub

I'd also like it to capture the username and input it in the same cell --
what do I need to do add to this statement to make that happen? Thanks.