Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() This sounds awfully basic, but for the life of me, I can't figure out how to do it. I would like the date at the top of my spreadsheet to reflect the last save date for the file. Isn't there a function that will handle this? -- tommy20 ------------------------------------------------------------------------ tommy20's Profile: http://www.excelforum.com/member.php...fo&userid=2817 View this thread: http://www.excelforum.com/showthread...hreadid=528191 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
There is no built-in function to do this.
A user designed function (UDF) is necessary. '-------------------- 'Place the following code in the "ThisWorkbook" module... Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Application.OnTime Now, ThisWorkbook.Name & "!TimeSaved" End Sub 'Place the following code in a standard module... Sub TimeSaved() Dim strPath As String strPath = ActiveWorkbook.Path Range("B4").Value = "Last saved: " & FileDateTime(strPath) End Sub '-------------------- Every time the workbook is saved, the saved date and time will appear in Cell B4 on the currently active sheet. Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "tommy20" wrote in message... This sounds awfully basic, but for the life of me, I can't figure out how to do it. I would like the date at the top of my spreadsheet to reflect the last save date for the file. Isn't there a function that will handle this? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() UDF, eh? Well, that'll sure be unknown territory for me. I'll give it a shot. Thanks! -- tommy20 ------------------------------------------------------------------------ tommy20's Profile: http://www.excelforum.com/member.php...fo&userid=2817 View this thread: http://www.excelforum.com/showthread...hreadid=528191 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This could be of assistance...
http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "tommy20"wrote in message ... UDF, eh? Well, that'll sure be unknown territory for me. I'll give it a shot. Thanks! tommy20 |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
The code I gave you has some problems when the
workbook is closed. Also, technically it is not a user designed function. The following code placed in a standard module should do what you want. It will update every time the workbook is recalculated. To use it, in a cell just enter ... = timesaved() Jim Cone '-------------------------- Function TimeSaved() Application.Volatile Dim strPath As String strPath = ActiveWorkbook.Path TimeSaved = "Last saved: " & FileDateTime(strPath) End Function |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Insert Automatic, Non-Updating Date Stamp | Excel Discussion (Misc queries) | |||
Automatic Date Entry | Excel Worksheet Functions | |||
search for latest date | Excel Worksheet Functions | |||
How do I stop today() from updating date on saved spreadsheets? | Excel Discussion (Misc queries) | |||
store file saved date in cell | Excel Worksheet Functions |