• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Record name of person entering data in cell

bnpdkh

Member
I have a macro that time stamps when data is entered in specific cell which works fine but I need to record the username as well. any help or links to information regarding this would be appreciated.
 
maybe I did not state this right, I want to record who entered comments in cell range V9:V306. I have macro to time stamp when comments entered
 
Try adding the line after your time stamp code:

Range(address).value = Application.username

regards,
Prasad DN
 
You must understand, Excel can't recognize a user from his face. You have to specify somewhere a list of users plus a selection by them for their username so that Excel know what to put in as a username.

Regards,
 
Ok, I have used the following to track date, and I want to convert it to Track name using Environ. Not working, keep getting complie error, any suggestions.
Code:
Sub Track_Name(ByVal Target As Range)
  ActiveSheet.Unprotect Password:="ken"
        With Target
            If .Count > 1 Then Exit Sub
            If Not Intersect(Range("V9:V306"), .Cells) Is Nothing Then
                Application.EnableEvents = False
                If IsEmpty(.Value) Then
                    .Offset(0, 5).ClearContents
                Else
                    With .Offset(0, 5)
                        '.NumberFormat = "dd mmm yy"
                        .Value UNameWindows = Environ("USERNAME")
 
                    End With
           
                End If
                Application.EnableEvents = True
            End If
        End With
  ActiveSheet.Protect Password:="ken"
    End Sub
 
This line is incorrect.
Code:
.Value UNameWindows = Environ("USERNAME")
Following should work
Code:
.Value = Environ("USERNAME")
You might also want this to test:
Code:
.Value = application.UserName
 
That was the issue, works perfectly now. Really appreciate the help with this issue. Thanks Shrivallabha SOLVED!!!!
 
Actually, I just noticed a little issue. The macro works well and adds the username as required, however, if the text in intersect cell is deleted after the workbook has been saved the username still appears even though there is no datat in intercect range cell. Not sure where or what to add to formula to clear offset range if intercect range cell is empty. Any ideas??
 
Back
Top