Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default How can I capture the last date a file was saved in the footer

I'm looking for a way to capture the date a file was last updated in an Excel
spreadsheet. If a file was last updated 3 days ago, I want to see that date,
not the date the file was printed.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 477
Default How can I capture the last date a file was saved in the footer

Paste this code into the THISWORKBOOK Module and then pick a cell (say A1)
that where you'd like for the date and time to appear and in it enter
=LastSaved


Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ThisWorkbook.Names.Add Name:="LastSaved", _
RefersToR1C1:="=""" & _
Format(Now, "mmm-dd-yyyy hh:mm") & """"
End Sub

Jim May

"DNader" wrote:

I'm looking for a way to capture the date a file was last updated in an Excel
spreadsheet. If a file was last updated 3 days ago, I want to see that date,
not the date the file was printed.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default How can I capture the last date a file was saved in the footer

Try this

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Sheet1").Range("A1").Value = Date
End Sub

Alt+F11 to open VB editor
double click This Workbook
Paste code in

Mike

"DNader" wrote:

I'm looking for a way to capture the date a file was last updated in an Excel
spreadsheet. If a file was last updated 3 days ago, I want to see that date,
not the date the file was printed.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 84
Default How can I capture the last date a file was saved in the footer

Hi Mike

Can I jump in on this thread? I'd like to do exactly this, but also put
alongside the username of who last saved the document. Do you have any VB
code that will let me put that in please?

Thanks
--
Marie Bayes


"Mike H" wrote:

Try this

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Sheet1").Range("A1").Value = Date
End Sub

Alt+F11 to open VB editor
double click This Workbook
Paste code in

Mike

"DNader" wrote:

I'm looking for a way to capture the date a file was last updated in an Excel
spreadsheet. If a file was last updated 3 days ago, I want to see that date,
not the date the file was printed.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Last Saved Date in Footer (right aligned) CherylH Excel Discussion (Misc queries) 8 September 5th 07 01:46 PM
how do I show last date file saved? Pete Excel Worksheet Functions 1 February 17th 05 06:25 PM
How do I capture the last saved time in Excel2003? [email protected] Excel Worksheet Functions 1 December 29th 04 07:40 PM
How to insert date last saved into the sheet (not the footer) Crispin Morton Excel Worksheet Functions 0 November 26th 04 08:30 AM
store file saved date in cell Martin Connelly Excel Worksheet Functions 1 November 16th 04 01:32 PM


All times are GMT +1. The time now is 01:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"