Hi
Please see a post below made by Tom Urtis a few years ago which may give you what you want.
Tony
Headers and footers are left, center, and right. Yes, they can be underlined. To do it, use the U& syntax. Here is an example of formatting the left header with the workbook name, the center header with some special manual notation, and the right header custom formatted for date and time.
With ActiveSheet.PageSetup
.LeftHeader = "&""Arial,regular""&U" & ThisWorkbook.Name
.CenterHeader = "&""Arial,regular""&U" & "Budget sheet 1 of 10"
.RightHeader = "&""Arial,regular""&U" & "Printed on " & Format(Now(), "mm/dd/yy, at hh:mm:ss")
End With
Regarding having the line stretch all the way across, one possible code line modification to do that would be to add spaces between quote marks, as in this example for the left header:
.LeftHeader = "&""Arial,regular""&U" & ThisWorkbook.Name & " "
You'd need to play around with it but that'd be the gist.
__________________
Tom Urtis
|