First time post.
Hope someone can help.
My workbook prints different type of reports. One of the reports requires a header. I seem to get nearly all the header printing as required but I need to have 4 headings going across the page. The number of pages can vary. The following is run in a Public Sub.
With Worksheets("P").PageSetup
.PrintArea = "A14:D" & lastCSrow
.Orientation = xlLandscape
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.3)
.TopMargin = Application.InchesToPoints(2.5)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.LeftHeader = "&""Arial,Black""&36 NAME SCOPE OF WORKS" & _
Chr(10) & "&""Arial,Black ""&14 Project :=" & proj & Chr(10) _
& "&""Arial,Black ""&14 CS No := " & CSnum & Chr(10) & _
"&""Arial,Black ""&14 Lift No := " & LiftNo & Chr(10) & _
"&""Arial,Black ""&14 Load := " & load & Chr(10) & "Items _ Changes Vendor Comments"
End With
Worksheets("P").PrintOut , preview:=True
I get a Error '1004' . Unable to set the LeftHeader property for the PageSetup class.
This appears due to the distance between 'Items, Changes, Vendor and Comments. How can I get these to print across the bottom of the header at the locations I want.
Hope someone can help.
My workbook prints different type of reports. One of the reports requires a header. I seem to get nearly all the header printing as required but I need to have 4 headings going across the page. The number of pages can vary. The following is run in a Public Sub.
With Worksheets("P").PageSetup
.PrintArea = "A14:D" & lastCSrow
.Orientation = xlLandscape
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.3)
.TopMargin = Application.InchesToPoints(2.5)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.LeftHeader = "&""Arial,Black""&36 NAME SCOPE OF WORKS" & _
Chr(10) & "&""Arial,Black ""&14 Project :=" & proj & Chr(10) _
& "&""Arial,Black ""&14 CS No := " & CSnum & Chr(10) & _
"&""Arial,Black ""&14 Lift No := " & LiftNo & Chr(10) & _
"&""Arial,Black ""&14 Load := " & load & Chr(10) & "Items _ Changes Vendor Comments"
End With
Worksheets("P").PrintOut , preview:=True
I get a Error '1004' . Unable to set the LeftHeader property for the PageSetup class.
This appears due to the distance between 'Items, Changes, Vendor and Comments. How can I get these to print across the bottom of the header at the locations I want.