I'm trying to have my header say:
Apples
Oranges
Bananas
But my code is giving an output of...
Apples
Oranges
Bananas
...with an extra line break in there. How do I fix this?
Here is my current code:
Thanks!
Apples
Oranges
Bananas
But my code is giving an output of...
Apples
Oranges
Bananas
...with an extra line break in there. How do I fix this?
Here is my current code:
Code:
Sub header_footer_unscale()Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
With ws.PageSetup
.ScaleWithDocHeaderFooter = False
.TopMargin = Application.InchesToPoints(0.9)
.RightHeader = "Apples" & vbNewLine & "Oranges" & vbNewLine & "Bananas"
End With
ActiveWindow.View = xlNormalView
Range("A1").Activate
Next
End Sub
Thanks!
Last edited: