+ Reply to Thread
Results 1 to 2 of 2

Can excel update date when document last changed?

  1. #1
    Nic
    Guest

    Can excel update date when document last changed?

    I am trying to figure out how to have a date showing in excel for when
    document was last updated. I know you can have date in the footer but that
    just shows current date when document is opened. I want date to only change
    to current if document has changed.

  2. #2
    Valued Forum Contributor
    Join Date
    12-16-2004
    Location
    Canada, Quebec
    Posts
    363
    Hi Nic

    Would this help you out
    Sub date_last_modified()
    date_modified = ActiveWorkbook.BuiltinDocumentProperties("Last Save Time")
    date_modified = Format(date_modified, "dd/mm/yyyy")
    'MsgBox date_modified
    'or insert in a cell of your choice
    'range("c1").select
    'activecell=date_modified
    ''
    'or insert in a center footer
    For Each wsheet In Sheets
    'the default date format is m/d/yy h:m:s AM/PM
    'alternate format is m/d/yy h:mm am/pm
    date_modified = Format(date_modified, "dd/mm/yyyy")
    wsheet.PageSetup.CenterFooter = "Last Modified: " & date_modified
    Next wsheet

    End Sub

+ 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