Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Current User or Author Stamp


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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Current User or Author Stamp

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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Current User or Author Stamp


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.


--
TimE
------------------------------------------------------------------------
TimE's Profile: http://www.excelforum.com/member.php...fo&userid=2139
View this thread: http://www.excelforum.com/showthread...hreadid=377458

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Current User or Author Stamp


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


--
anilsolipuram
------------------------------------------------------------------------
anilsolipuram's Profile: http://www.excelforum.com/member.php...o&userid=16271
View this thread: http://www.excelforum.com/showthread...hreadid=377458

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Current User or Author Stamp


Thanks to both. Much appreciated. Someday I will be able to assist
instead of making everyone think for me.


--
TimE
------------------------------------------------------------------------
TimE's Profile: http://www.excelforum.com/member.php...fo&userid=2139
View this thread: http://www.excelforum.com/showthread...hreadid=377458

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date stamp user Stuart WJG[_2_] Excel Discussion (Misc queries) 7 August 7th 09 11:38 PM
Current date in the comment instead of the user ID Gary[_2_] Excel Worksheet Functions 1 October 22nd 07 11:11 PM
Formula returning current user name TBoeck Excel Worksheet Functions 5 October 3rd 06 07:53 PM
In Excel, how do I insert User Name (author) in a cell. George B. Excel Discussion (Misc queries) 3 August 23rd 05 11:46 PM
current row of user-defined function? usenethelp Excel Programming 5 July 22nd 04 04:53 AM


All times are GMT +1. The time now is 05:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"