koala
05-17-2010, 01:56 AM
Hi Forum,
I have the following code in the "ThisWorkbook" module to update my footers each time I print the page, however it only updates if I print one page, or print preview before printing. I often print a group of pages, and want all pages to update before printing.
Can someone steer me in the right direction?
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.CenterFooter = "&8This file was last modified on: " & Format(Me.BuiltinDocumentProperties("last save time"), "ddd, dd mmm yyyy hh:mm")
End With
With ActiveSheet.PageSetup
.RightFooter = "&8 Printed by " & Application.UserName & " on " & Format(Date, "ddd, dd mmmm yyyy") & " at " & Format(Time, "hh:mm")
End With
End Sub
cheers
Koala
I have the following code in the "ThisWorkbook" module to update my footers each time I print the page, however it only updates if I print one page, or print preview before printing. I often print a group of pages, and want all pages to update before printing.
Can someone steer me in the right direction?
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.CenterFooter = "&8This file was last modified on: " & Format(Me.BuiltinDocumentProperties("last save time"), "ddd, dd mmm yyyy hh:mm")
End With
With ActiveSheet.PageSetup
.RightFooter = "&8 Printed by " & Application.UserName & " on " & Format(Date, "ddd, dd mmmm yyyy") & " at " & Format(Time, "hh:mm")
End With
End Sub
cheers
Koala