Hi Rocky,
Still here, still struggling.
I went back through the posts and followed your enumerated instructions to jluecht to a 't'.
As well, I changed my code to look identical to yours (aside from the actual text content for the headers and footers).
When I open book1 and open the visual basic (alt-F11), the personal.xls shows on the header, and the personal.xls ThisWorkbook is the last one on the Project Explorer list. My understanding is that personal.xls is similar to normal.dot for WORD, in that it acts like a template for ALL Excel worksheets. That is where my code is.
When I save, close visual basic, and do a print preview or a print, there are no headers or footers.
What am I doing wrong?
I'd like to have this thing (if I can ever get it to work) to be under command control (either in a drop down menu or a command key, ie ctrl-xx) so that I could choose whether or not to execute the macro. If that is the case, doesn't it need to be a separate module (ie not in ThisWorkbook) of personal.xls?
Here's my code that is not working:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
For Each wk In Worksheets
With ActiveSheet.PageSetup
.LeftHeader = "&""Arial,Italic""&06" & "Last Modified on " & ActiveWorkbook.BuiltinDocumentProperties.Item("Last Save Time")
.CenterHeader = "&""Arial,Italic""&06" & "Page &P of &N"
.RightHeader = "&""Arial,Italic""&06" & "Printed on &D &T"
.LeftFooter = "&""Arial,Italic""&06 &D"
.CenterFooter = "&""Arial,Italic""&06" & ActiveWorkbook.FullName
.RightFooter = "&""Arial,Italic""&06 &A"
End With
Next
Application.ScreenUpdating = True
End Sub
Thanks again for your help. I appreciate your patience with us novices!