Display Date Modified

D

debbieevans

Is there a way to display last date modified on a worksheet without running a
macro and always in the same cell?
 
G

Gary''s Student

If someone suggests a solution without VBA, ignore this response.

Function lastsaved() As Double
lastsaved = ActiveWorkbook.BuiltinDocumentProperties(12)
End Function

just enter:
=lastsaved()
in any cell.
 
D

debbieevans

Do I copy the 3 lines below into the sheets code? or do I have to add some
text, sorry but I am new to VBA?
 
G

Gary''s Student

Macros are very easy to install and use:

1. CNTRL-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff (three line function) in and close the VBE window

If you save the workbook, the macro will be saved with it.


To remove the macro:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
D

debbieevans

When I enter =lastsaved() in a cell the cell shows #NAME?
I changed the format for the cell to date?
Sorry to be such a beginner
 
G

Gary''s Student

That error message means that Excel does not recognize the function. It
usually means the function is in the wrong place. If you installed the
function by right-clicking the tab name and selection View Code, then its in
the wrong place. Erase that version and follow the installation instructions
I gave in the first post.


Update this if you are still having problems.
 
Top