Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Date Last Saved

Does anyone know how to access the "Date Last Saved"
attribute of a file using VB Code? I want to display the
latest date the file was saved in a footer when printed,
not necessarily the current date or file creation date.
Because Excel is designed to change the modified date of a
file when it is opened (the original modify date is held
in memory and restored if you don't save changes), I can't
use the ".DateLastModified attribute. Any suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Date Last Saved

? Activeworkbook.BuiltinDocumentProperties("Last Save Time").Value
2/4/2003 1:35:46 PM

Note that this value is not maintained in Excel 97.

Regards,
Tom Ogilvy



"Craig" wrote in message
...
Does anyone know how to access the "Date Last Saved"
attribute of a file using VB Code? I want to display the
latest date the file was saved in a footer when printed,
not necessarily the current date or file creation date.
Because Excel is designed to change the modified date of a
file when it is opened (the original modify date is held
in memory and restored if you don't save changes), I can't
use the ".DateLastModified attribute. Any suggestions?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Date Last Saved

Hi Craig,

Here is one way to stamp the date into a worksheet footer when someone saves
the workbook.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
myString = "&""Arial,Italic""&14" & Format(Date, "MMM/DD/YYYY")
Sheets("Sheet1").PageSetup.LeftFooter = myString
End Sub

--
Regards,
Rocky McKinley


"Craig" wrote in message
...
Does anyone know how to access the "Date Last Saved"
attribute of a file using VB Code? I want to display the
latest date the file was saved in a footer when printed,
not necessarily the current date or file creation date.
Because Excel is designed to change the modified date of a
file when it is opened (the original modify date is held
in memory and restored if you don't save changes), I can't
use the ".DateLastModified attribute. Any suggestions?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Date Last Saved

Correction,

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
myString = "&""Arial,Italic""&14" & Format(Now, "MMM/DD/YYYY HHHH:MM:SS
")
Sheets("Sheet1").PageSetup.LeftFooter = myString
End Sub

--
Cheers,
Rocky McKinley


"Rocky McKinley" wrote in message
...
Hi Craig,

Here is one way to stamp the date into a worksheet footer when someone

saves
the workbook.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
myString = "&""Arial,Italic""&14" & Format(Date, "MMM/DD/YYYY")
Sheets("Sheet1").PageSetup.LeftFooter = myString
End Sub

--
Regards,
Rocky McKinley


"Craig" wrote in message
...
Does anyone know how to access the "Date Last Saved"
attribute of a file using VB Code? I want to display the
latest date the file was saved in a footer when printed,
not necessarily the current date or file creation date.
Because Excel is designed to change the modified date of a
file when it is opened (the original modify date is held
in memory and restored if you don't save changes), I can't
use the ".DateLastModified attribute. Any suggestions?





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
Date open file with date saved Rita Excel Worksheet Functions 3 April 23rd 09 03:13 PM
Last Date Saved Techy DuWright Setting up and Configuration of Excel 1 April 2nd 09 03:51 PM
Automatic Saved Date tommy20 Excel Worksheet Functions 2 March 30th 06 09:16 PM
Last Saved Date Sloth Excel Discussion (Misc queries) 3 December 1st 05 03:48 PM
last date saved buddys Excel Discussion (Misc queries) 1 January 17th 05 03:49 PM


All times are GMT +1. The time now is 03:41 AM.

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"