Can I have revision date auto inserted when excel file is changed

B

BJacobi

I am looking for a function or formula that will automatically insert a date
when I revise a document that will be saved and visible to anyone that
accesses that file in the future. The file will be revised periodically and i
will not need a history, rather the last revision date.
 
M

Mike H

Hi,

You could use the built in document property. Put this in the 'before_save
event

sheets("Sheet1").Range("A1").Value = _
ActiveWorkbook.BuiltinDocumentProperties("last save time")

Mike
 
C

Chip Pearson

Press ALT F11 to open the VBA editor. There, go to the Insert menu,
choose Module, and paste the following code into that module.

Function LastSavedDate() As Date
LastSavedDate = FileDateTime(ThisWorkbook.FullName)
End Function

Close the VBA editor and return to Excel. In the cell in which you
want the last saved time to appear, enter

=LastSavedDate()

This will return the date and time of the last save operation.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
Joined
Nov 30, 2010
Messages
1
Reaction score
0
Mac?

I am using Office for Mac 2011 and can not get the formula to work, any suggestions? As I inserted the VBA module, but nothing?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top