1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Show last edit date in Excel ?

Discussion in 'Business Applications' started by New2XP, Dec 17, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. New2XP

    New2XP Thread Starter

    Joined:
    Sep 23, 2005
    Messages:
    37
    In EXCEL (Office 2002) Is there a way to have a header that is auto matically updated to show the date the file was last edited(changed) ? . It should do this each time the file is edited(changed). Then when the file (.XLS) is emailed to someone and they print it, The last "edit(changed)" date will show .Currently the local date the file is printed is showing.
    Manually editing the header is forgotten at busy times.
     
  2. Zack Barresse

    Zack Barresse

    Joined:
    Jul 25, 2004
    Messages:
    5,447
    Hi there,

    Please define in detail what exactly you mean by last edited date? Do you mean the document properties? After specific changes? Is this for one file?
     
  3. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,269
    You probably really want the date/time of last save, as unsaved edits would be immaterial. (?)

    Try this code in the workbook module (which you can access by rightclicking the Excel icon to the left of "File" in the menu bar):

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    ActiveSheet.PageSetup.LeftHeader = "Last edit: " & Date & " " & Time
    End Sub
     
  4. New2XP

    New2XP Thread Starter

    Joined:
    Sep 23, 2005
    Messages:
    37
    B#21
    That is axactly what I was looking for. Will give it a try and
    post the results.
    Thanks
     
  5. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    New2Xp, there was a previous thread either on here or on VBAX where every cell changed had it's change logged in the Cell's Comment, which you might want to look at for another way of recording changes.
     
  6. Zack Barresse

    Zack Barresse

    Joined:
    Jul 25, 2004
    Messages:
    5,447
    New2XP, fyi, Andy's code will put the current System date and time (as the time when the code is executed) into the header, which will not be the "Last edited date" such as in the document properties.
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/527435