+ Reply to Thread
Results 1 to 5 of 5

Adding User Info to Macro

  1. #1
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Adding User Info to Macro

    I have a macro that when run it looks in a certain column and if the contents contain a certain word it copies the row the word is on and pastes it to the bottom of another sheet. I'm using a network and various people have access to the file. I want to have it so that when it pastes to the bottom of the other sheet it also says who was responsible for doing that? Is this somehow possible?

  2. #2
    Registered User
    Join Date
    12-23-2012
    Location
    usa
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Adding User Info to Macro

    You can use this to get the user id
    Please Login or Register  to view this content.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Adding User Info to Macro

    Check out the

    Application.UserName

    syntax and include that after the paste has taken place. You'll need to decide where you want to place this. For task logging like this I generally call a a dedicated 'TaskLog' sheet and call a logging macro as below (passing the action name as a string descriptor).

    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Adding User Info to Macro

    Please Login or Register  to view this content.
    How would I alter this code to add the username in column S of the row it pastes onto?
    Last edited by ScabbyDog; 12-24-2012 at 01:27 PM.

  5. #5
    Registered User
    Join Date
    12-23-2012
    Location
    usa
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Adding User Info to Macro

    you can try this
    Please Login or Register  to view this content.

+ 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