Show date/time spreadsheet saved

  • Thread starter Thread starter Del
  • Start date Start date
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.
 
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
 
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 **
 

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

Back
Top