Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Last Saved Date Formula / Function

Hi there

Working with Excel 2003 - I dug some code up on the group, but I must
be doing something wrong. I entered this code in the Visual Basic
Editor.
==========
Function LastSaved() As Variant
'this function used to recall the last-saved date on the file
On Error GoTo NotSaved

LastSaved = ThisWorkbook.BuiltinDocumentProperties("Last save time")
Exit Function

NotSaved:
LastSaved = False

End Function
==========

Then in a cell I put:
=LastSaved()

However, while it inserts the current time, it does not seem to pickup
saves. I tried this:
Create worksheet
Insert function (puts in current time)
Save/close
Re-open
Edit a cell then save - no change
Close/Re-open - no change
But if I then copy/paste the formula the copy takes (I presume) the
current date - so there is life there - just no smarts.

Any tips would be great - I don't have much experience with Functions.
Thanks
Dave

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bearacade
 
Posts: n/a
Default Last Saved Date Formula / Function


I tried the code and it works perfectly fine...

What formating do you have for the cell that is pulling up the fuction?
I used the date and time stamp.

[$-409]m/d/yy h:mm AM/PM;@

I reverted back a month, saved the spreadsheet, opened it up and called
the function and it was giving me the correct time and date.


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=549160

  #3   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Last Saved Date Formula / Function

Bearacade wrote:
I tried the code and it works perfectly fine...

What formating do you have for the cell that is pulling up the fuction?
I used the date and time stamp.

[$-409]m/d/yy h:mm AM/PM;@

I reverted back a month, saved the spreadsheet, opened it up and called
the function and it was giving me the correct time and date.
--
Bearacade


This is my formatting on the cell:
m/d/yyyy h:mm

Can I ask what "called the function" means? Does this mean something
has to be manually done to the function, and that it won't work
automatically?

  #4   Report Post  
Posted to microsoft.public.excel.misc
Bearacade
 
Posts: n/a
Default Last Saved Date Formula / Function


It just mean I entered =LastSaved() into the cell calling the function.
Which you are already doing. I don't know why it isn't working for you.
=(


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=549160

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
Need help with a date function formula KAA Excel Discussion (Misc queries) 2 August 29th 05 04:30 PM
Need to use IF formula with a Date cell Eric Mc Excel Worksheet Functions 2 June 8th 05 12:38 AM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Calculating days between current date and a date in future NETWORKDAYS() function Faheem Khan Excel Worksheet Functions 2 February 10th 05 07:18 PM
Need help troubleshooting an array formula XLXP on Win2K KR Excel Worksheet Functions 1 December 13th 04 07:41 PM


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