I wrote a very simple line in VBA, I need a shared document to automatically record the name of the whomever entered information into a cell for audit purposes. The Code is:
Function GetUserName()
GetUserName = Environ("USERNAME")
End Function
also tried:
Function GetUserName()
GetUserName = Application.Username
End Function
In both cases, it works for me but returns #NAME? for any other user. Any ideas?