last date saved

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Ok, I have been working on this for a while. I got some sheets to work but
others don't. This is how I am doing it.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In ThisWorkbook.Worksheets
wkSht.PageSetup.RightFooter = "&8Last Saved : " & _
ThisWorkbook.BuiltinDocumentProperties("Last Save Time")
Next wkSht
End Sub

But on some sheets, It dosen't work. Also is there a way of putting it into
a certin cell and not the footer?
Thanks,
Buddy
 
Buddy,

No reason that shouldn't work. Is it not working on say chart sheets, or on
worksheets?

would only do it for the activesheet myself

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
Activesheet.PageSetup.RightFooter = "&8Last Saved : " & _
ThisWorkbook.BuiltinDocumentProperties("Last Save Time")
End Sub

saves doing all sheets every time.

To put it in a cell use

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In ThisWorkbook.Worksheets
wkSht.Range("A1").Value = "&8Last Saved : " & _
ThisWorkbook.BuiltinDocumentProperties("Last Save Time")
Next wkSht
End Sub

or

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
Activesheet.Range("A1").Value = "&8Last Saved : " & _
ThisWorkbook.BuiltinDocumentProperties("Last Save Time")
End Sub

or even put the loop code in a standard macro.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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