#1   Report Post  
buddys
 
Posts: n/a
Default last date saved

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
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

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)


"buddys" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date updates from worksheet to chart & changes date to a date series! Help!! Jayjg Charts and Charting in Excel 2 January 22nd 05 03:00 PM
Inserting the date that an excel sheet is saved into a cell sharock Excel Discussion (Misc queries) 2 January 6th 05 07:07 PM
How do I stop today() from updating date on saved spreadsheets? lionmark Excel Discussion (Misc queries) 2 January 4th 05 01:03 AM
Date formula Robyn Bellanger Excel Discussion (Misc queries) 2 December 16th 04 12:41 AM
Problem with Date format from VBA code twig Excel Discussion (Misc queries) 3 December 7th 04 06:01 PM


All times are GMT +1. The time now is 09:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"