+ Reply to Thread
Results 1 to 4 of 4

auto timestamp a:a when any cell in a row changes

  1. #1
    Registered User
    Join Date
    11-04-2011
    Location
    Alberta
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    22

    Exclamation auto timestamp a:a when any cell in a row changes

    i'm trying to get VBA to auto timestamp column a when any cell in that row changes.... any ideas....???

  2. #2
    Valued Forum Contributor ffffloyd's Avatar
    Join Date
    05-20-2008
    Location
    Perth, WA, Australia
    MS-Off Ver
    Office 365
    Posts
    249

    Re: auto timestamp a:a when any cell in a row changes

    You need to code for the Worksheet_Change event. Be careful that you only apply the timestamp for specific columns though---or at least exclude the timestamp column from consideration---or you will generate a new timestamp every time you generate a new timestamp!
    _______________
    Floyd Emerson
    Business Intelligence Consultant
    Perth, Western Australia

  3. #3
    Registered User
    Join Date
    11-04-2011
    Location
    Alberta
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    22

    Re: auto timestamp a:a when any cell in a row changes

    can you provide sample code, i am new to VBA, experienced in web languages....

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: auto timestamp a:a when any cell in a row changes

    Hello stolen_83,

    Welcome to the Forum!

    There are two macros you need to install. One is the Worksheet_Change event and the second is in a VBA Module. The second macro adds the time stamp as a Comment to the cell. If the cell does not have a Comment then one is added automatically. If the cell does have a Comment then only the time stamp is added.

    Worksheet_Change Event Code
    Please Login or Register  to view this content.

    How to Save a Worksheet Event Macro
    1. Copy the macro using CTRL+C keys.
    2. Open your Workbook and Right Click on the Worksheet's Name Tab for the Worksheet the macro will run on.
    3. Left Click on View Code in the pop up menu.
    4. Paste the macro code using CTRL+V
    5. Save the macro in your Workbook using CTRL+S


    Module Code - AddTimestamp Macro
    Please Login or Register  to view this content.

    Adding the Macro (Excel 95 - 2003)
    1. Copy the macro above pressing the keys CTRL+C
    2. Open your workbook
    3. Press the keys ALT+F11 to open the Visual Basic Editor
    4. Press the keys ALT+I to activate the Insert menu
    5. Press M to insert a Standard Module
    6. Paste the code by pressing the keys CTRL+V
    7. Save the Macro by pressing the keys CTRL+S
    8. Press the keys ALT+Q to exit the Editor, and return to Excel.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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