Hi,
I am trying to create a macro that add a multiple line header to all the pages of a worksheet before printing.
I have written this code but it's not working.Please help
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.DifferentFirstPageHeaderFooter = True
.FirstPage.LeftHeader = "&""Times New Roman,Bold""&16 TEST" & Chr(10)_
& "Times New Roman,Bold""&16TEST2" & Chr(10) _
& "Times New Roman,Bold""&16TEST3"
.LeftHeader = "&""Times New Roman,Bold""&12TEST4"
End With
End Sub
Bookmarks