Setting printer header via code
Hi
I'm running this code below to set the left header on each worksheet in my
activeworkbook with name "Adjustments".
It's working good..but is there a way to set the header to line up with the
left margin?
I have my left and right margins set to 0
Sub PrintHEADERAdjustment()
'Set Print Header on Adjusmtents sheets
Dim sh1 As Excel.Worksheet
Dim sh As Excel.Worksheet
Set sh1 = ActiveWorkbook.ActiveSheet
For Each sh In ActiveWorkbook.Worksheets
sh.Activate
If InStr(1, sh.Name, "Adjustments", vbTextCompare) Then
sh.PageSetup.LeftHeader = "&""Arial,Bold""&11" & "Insurance Co: " &
Range("Insurance_Co") & " " & "Policyholder: " & Range("Policyholder") &
Chr(10) & "Policy No: " & Range("Policy_No") & " " & " Period " &
Range("From2") & " " & Range("To2")
End If
Next 'sh
sh1.Activate
Set sh1 = Nothing
Set sh = Nothing
End Sub
Thanks in advance!
Kimberly
|