Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 63
Default Put Date Worksheet last saved in cell

Excel 2003 - Does anyone know of a function or possible macro that
automatically will put the date the worksheet was last saved in cell A1 of a
spreadsheet. So when the user hits the save button this date gets
automatically updated. If the user just opens the spreadsheet but does not
do anything to it or save it then the date would not change.

A function would be best if possible as then the user doesn't have to accept
running macro's when they first open the spreadsheet. If that isn't possible
then some coding will do.

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Put Date Worksheet last saved in cell

Hi duketter

You can paste this event in the thisworkbook module

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
'If you save the file the date/time will be placed in cell A1 of Sheet1
Sheets("Sheet1").Range("A1").Value = Format(Now, "yyyy-mmm-dd hh:mm:ss")
End Sub


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"duketter" wrote in message ...
Excel 2003 - Does anyone know of a function or possible macro that
automatically will put the date the worksheet was last saved in cell A1 of a
spreadsheet. So when the user hits the save button this date gets
automatically updated. If the user just opens the spreadsheet but does not
do anything to it or save it then the date would not change.

A function would be best if possible as then the user doesn't have to accept
running macro's when they first open the spreadsheet. If that isn't possible
then some coding will do.

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Put Date Worksheet last saved in cell

How about:-

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Worksheets("sheet1").Range("A1").Value = Now
End Sub

Mike

"duketter" wrote:

Excel 2003 - Does anyone know of a function or possible macro that
automatically will put the date the worksheet was last saved in cell A1 of a
spreadsheet. So when the user hits the save button this date gets
automatically updated. If the user just opens the spreadsheet but does not
do anything to it or save it then the date would not change.

A function would be best if possible as then the user doesn't have to accept
running macro's when they first open the spreadsheet. If that isn't possible
then some coding will do.

Thanks!

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
Worksheet function: last saved date Tieske Excel Worksheet Functions 1 October 24th 06 05:59 PM
Populating Last Saved Date in Cell AND also update that same cell in Header o0o_Bigs_o0o Excel Discussion (Misc queries) 2 July 4th 06 12:56 PM
Update a formula based on date worksheet was saved Kevin McQuain Excel Worksheet Functions 0 October 6th 05 02:06 PM
? on "date last saved" in cell chris w Excel Worksheet Functions 2 January 20th 05 12:51 AM
How do I show the last saved date in an Excel worksheet? mgriffie Excel Worksheet Functions 1 January 5th 05 08:46 AM


All times are GMT +1. The time now is 12:27 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"