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

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

XL-Dennis

Well-known Member
Joined
Jul 27, 2002
Messages
1,920
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

cpugh

New Member
Joined
Jun 30, 2002
Messages
21
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

XL-Dennis

Well-known Member
Joined
Jul 27, 2002
Messages
1,920
ADVERTISEMENT
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

ai18ma

New Member
Joined
Feb 20, 2007
Messages
9
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

MBurgin

New Member
Joined
Jul 28, 2011
Messages
1
ADVERTISEMENT
That's really useful, but is it possible just to return the date rather than the date and time?

Thanks,

Mark
 
Upvote 0

takoisam

New Member
Joined
Jan 14, 2013
Messages
1
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,195,625
Messages
6,010,757
Members
441,568
Latest member
abbyabby

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
Top