Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Date updates from worksheet to chart & changes date to a date series! Help!! | Charts and Charting in Excel | |||
Inserting the date that an excel sheet is saved into a cell | Excel Discussion (Misc queries) | |||
How do I stop today() from updating date on saved spreadsheets? | Excel Discussion (Misc queries) | |||
Date formula | Excel Discussion (Misc queries) | |||
Problem with Date format from VBA code | Excel Discussion (Misc queries) |