I saw the code somewhere and don' t remember where. I would like to have a 'timestamp' of sorts that when A1 is modified, then C1 will stamp the current user logon name. Thanks in advance.
I saw the code somewhere and don' t remember where. I would like to have a 'timestamp' of sorts that when A1 is modified, then C1 will stamp the current user logon name. Thanks in advance.
Something like this...
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ErrorHandler
Application.EnableEvents = False
If Target.Address = "$A$1" Then _
Target.Offset(0, 2).Value = Environ("UserName")
ErrorHandler:
Application.EnableEvents = True
End Sub
--
HTH...
Jim Thomlinson
"TimE" wrote:
>
> I saw the code somewhere and don' t remember where. I would like to
> have a 'timestamp' of sorts that when A1 is modified, then C1 will
> stamp the current user logon name. Thanks in advance.
>
>
> --
> TimE
> ------------------------------------------------------------------------
> TimE's Profile: http://www.excelforum.com/member.php...fo&userid=2139
> View this thread: http://www.excelforum.com/showthread...hreadid=377458
>
>
Thank you for your help. This is what I need, but column A will be modified so column C will need the author or current user. Sorry for not specifying it in the first request.
Minor change in Jim's code will solve your purpose
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ErrorHandler
Application.EnableEvents = False
If Target.column = "1" Then _
Target.Offset(0, 2).Value = Environ("UserName")
ErrorHandler:
Application.EnableEvents = True
End Sub
Thanks to both. Much appreciated. Someday I will be able to assist instead of making everyone think for me.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks