insert savedate field into excel

cpugh

New Member
Joined
Jun 30, 2002
Messages
21
Is there any way to show the save date of the excel document in the same way that ms word does when you insert the savedate field?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
cpugh,

Yes, but it require a User Defined Function (UDF).

<pre>
Public Function LastSaved() As String
Application.Volatile (True)
LastSaved = ThisWorkbook.BuiltinDocumentProperties("Last Save Time")
End Function
</pre>

Mail back if You need help with creating it :)

HTH,
Dennis
 
Upvote 0
Thanks - that's perfect! I set it up to run each time the spreadsheet is opened, and it pastes LastSaved into a cell in one of the worksheets :))
 
Upvote 0
On 2002-08-26 17:05, Juan Pablo G. wrote:
Dennis, why did you make it Volatile ?

That function *shouldn't* change THAT often ! :wink:

LOL :wink:
While testing it out I saved it a lot and it didn´t update so I placed the Volatile-function into it....

Kind regards,
Dennis
_________________
"Windows was not able to find any keyboard. Press F1-button to try again or F2-button for cancel."
This message was edited by XL-Dennis on 2002-08-27 00:41
 
Upvote 0
Hi Denis,

Thanks for the tip. However, somehow it works differently with me! Here's what I did:
1. Opened the VBA editor (Press Alt+F11)
2. Inserted a new module (Insert > Module)
3. Copy/Pasted the user defined function LastSaved as shown here.
4. Left the VBA editor (Press Alt+Q)

At first, it displayed: 06.06.2007 and a time value. I then saved, closed and re-opened Excel. The function seemed to work. Now, it is stuck at this other value: 30.10.2007 12:55:22! And no matter what I do, the same value is shown. What have I done wrong?

I am using English Excel on a German machine.

Thanks
 
Upvote 0
That's really useful, but is it possible just to return the date rather than the date and time?

Thanks,

Mark
 
Upvote 0
Try this;

LEFT(LastSave();10)

Another option to displaying only the date is:

=TEXT(LastSaved(), "m/d/YYYY")

You can replace the m/d/YYYY with whatever your preferred date formatting is.

Sorry for bumping such an old thread.
 
Upvote 0

Forum statistics

Threads
1,213,497
Messages
6,113,999
Members
448,541
Latest member
iparraguirre89

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top