+ Reply to Thread
Results 1 to 4 of 4

How do I show the last saved date in an Excel worksheet?

  1. #1
    mgriffie
    Guest

    How do I show the last saved date in an Excel worksheet?

    I have an Excel worksheet that is updated on a regular basis. I'd like to
    include a cell that shows the last date saved so that its easy to tell how
    current the worksheet is. Any advice? Thanks!


  2. #2
    Forum Contributor
    Join Date
    11-16-2004
    Posts
    282

    Show last saved info

    Here' a macro that will populate a cell A1 with date/time the workbook was last saved (be sure to change the cell reference in BOLD to the cell you want the saved date in):

    Sub getChangeInfo()
    Dim lastAuth, lastSave
    lastSave = ActiveWorkbook.BuiltinDocumentProperties(12)
    ActiveSheet.Range("A1") = "Last Saved: " & lastSave
    End Sub

    Hope this helps,
    theDude

  3. #3
    Registered User
    Join Date
    07-16-2004
    Posts
    56
    Here's one that i like to use. It's not actually what you asked for though, this will put the info in the status bar on the bottom. if it's too long, you can cut out the time or username or whatever else.

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    SaveStamp
    End Sub

    Private Sub Workbook_Deactivate()
    Application.StatusBar = False
    End Sub

    Sub SaveStamp()
    Application.StatusBar = "Last Saved on " & Date & " at " & Time & " by " & Application.UserName
    End Sub

  4. #4
    Frank Kabel
    Guest

    Re: How do I show the last saved date in an Excel worksheet?

    Hi
    use the following UDF:
    Function DocProps(prop As String)
    application.volatile
    On Error GoTo err_value
    DocProps = ActiveWorkbook.BuiltinDocumentProperties _
    (prop)
    Exit Function
    err_value:
    DocProps = CVErr(xlErrValue)
    End Function

    and enter in a cell
    =DOCPROPS("last save time")
    (format cell as date)

    --
    Regards
    Frank Kabel
    Frankfurt, Germany
    "mgriffie" <mgriffie@discussions.microsoft.com> schrieb im Newsbeitrag
    news:8885527D-BDD2-4931-B1A2-0DF2CD2D2B15@microsoft.com...
    >I have an Excel worksheet that is updated on a regular basis. I'd like to
    > include a cell that shows the last date saved so that its easy to tell how
    > current the worksheet is. Any advice? Thanks!
    >




+ 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