Show date/time spreadsheet saved

D

Del

Is it possible to show this in a cell which automatically
updates every time the spreadsheet is saved?

I would think it is but I can't seem to find anything in
the help files. Am I missing something.

Many thanks in advance.
 
J

jeff

Hi,

Yes. Here's a macro which saves the date/time
when you change any cell in cells C1:C5 (ten cols to the
right).

Or you could add it in the auto close macro (furtherbelow)
(this doesn't guarantee getting in if not saved)

There are other possibilities too.


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Me.Range("C1:C5")) Is Nothing Then
Exit Sub
Application.EnableEvents = False
Target.Offset(0, 10) = Now()
Application.EnableEvents = True
End Sub
-or-
Sub Auto_close
worksheets("Sheet1").range("A1") = now()
sub

jeff
 
P

Paul B

Del, use the before save event, put this in the thisworkbook module, this
will update A1 every time you save the workbook

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Worksheets("Sheet1").Range("A1") = Now()
End Sub

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **
 
Top