+ Reply to Thread
Results 1 to 5 of 5

Current User or Author Stamp

  1. #1
    Registered User
    Join Date
    10-30-2003
    Posts
    49

    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.

  2. #2
    Jim Thomlinson
    Guest

    RE: 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. #3
    Registered User
    Join Date
    10-30-2003
    Posts
    49
    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.

  4. #4
    Forum Contributor
    Join Date
    11-09-2004
    Posts
    451
    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

  5. #5
    Registered User
    Join Date
    10-30-2003
    Posts
    49
    Thanks to both. Much appreciated. Someday I will be able to assist instead of making everyone think for me.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1