+ Reply to Thread
Results 1 to 9 of 9

Showing the date last modified upon opening workbook?

Hybrid View

  1. #1
    Registered User
    Join Date
    05-24-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    17

    Showing the date last modified upon opening workbook?

    Hi All,

    I've currently got an Excel sheet linked up to a DB that refreshes every 15 or so minutes. unfortunately for the users they can't tell if the data has been refreshed just by looking at the sheet.

    I'm trying to find a way of displaying the last modified date and time (maybe in a specific cell) upon opening the book. I've found information on how to show the date and time when printing a sheet but wondered if anyone knew how to display in the workbook itself?

    Thanks

    Nick

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Showing the date last modified upon opening workbook?

    Can you share this information ?
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    05-24-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Showing the date last modified upon opening workbook?

    Quote Originally Posted by patel45 View Post
    Can you share this information ?
    Not publicly. Sorry.

  4. #4
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: Showing the date last modified upon opening workbook?

    Hi -

    How about
    ActiveWorkbook.BuiltinDocumentProperties(12)
    Regards,
    Event

  5. #5
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Showing the date last modified upon opening workbook?

    Very good start in forum, you are here only to take and not to give

  6. #6
    Registered User
    Join Date
    05-24-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Showing the date last modified upon opening workbook?

    Quote Originally Posted by patel45 View Post
    Very good start in forum, you are here only to take and not to give
    That's a very unfair comment.

    I may have misunderstood your question about sharing the information but I'm not in a legal position to be able to share the data of the sheet.

    I'm asking for idea's about how to achieve this, if this forum isn't the place to ask questions and get help why bother signing up?

  7. #7
    Registered User
    Join Date
    05-24-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Showing the date last modified upon opening workbook?

    Quote Originally Posted by patel45 View Post
    Very good start in forum, you are here only to take and not to give
    I'll assume you wanted me to share the code for printing the last modified date?

    If so, in the workbook:

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    For Each Sheet In ThisWorkbook.Sheets
    Sheet.PageSetup.LeftFooter = "Last saved: " & Format(Date, "dd-mm-yy") & " " & Time
    Next Sheet
    End Sub

    This will show the last date time the doc was saved on a printed sheet.

    I'm trying to get it to pull this date time into a worksheet.

  8. #8
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Showing the date last modified upon opening workbook?

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    For Each Sheet In ThisWorkbook.Sheets
      Sheet.range("L1").value = "Last saved: " & Format(Date, "dd-mm-yy") & " " & Time
    ' Sheet.range("L1").value = now() ' alternative
    Next Sheet
    End Sub
    Last edited by patel45; 12-04-2012 at 10:47 AM.

  9. #9
    Registered User
    Join Date
    05-24-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Showing the date last modified upon opening workbook?

    Thanks for the replies. I managed to get there with Event's

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    On Error Resume Next
    Worksheets(1).Activate
    Cells(1, 1).Value = ActiveWorkbook.BuiltinDocumentProperties(12).Value
    End Sub

    I'm still testing the sheet to see if the data is transferred.

+ 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