I want to display the last file save date in an excel spreadsheet

  • Thread starter Export Waypoints from S&T ''06
  • Start date
E

Export Waypoints from S&T ''06

Is it possible to display the last file save date in an excel spreadsheet
like one can in Word?

D2
 
M

Mike H

Hi,

Alt+F11 to open VB editor. Double click 'This Workbook' and paste this in on
the right. Change the sheet and column to suit

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
lastrow = Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
Cells(lastrow + 1, 1).Value = "Last saved " & Now
End Sub

Mike

Mike
 
G

Gord Dibben

Private Sub Workbook_BeforeSave(ByVal SaveAsUI _
As Boolean, Cancel As Boolean)
Worksheets("Sheet1").Range("A1").Value _
= "Last Saved on " & Format(Date, "mmmm dd, yyyy")
End Sub


Gord Dibben MS Excel MVP
 
J

Jarek Kujawa

another way might be to use

Private Sub Workbook_BeforePrint(Cancel As Boolean)
lastrow = Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
Cells(lastrow + 1, 1).Value = ActiveWorkbook.BuiltinDocumentProperties
(12)
End Sub
 

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