Multi-line Header Fonts not working suddenly

JohnZ1156

Board Regular
Joined
Apr 10, 2021
Messages
180
Office Version
  1. 2021
Platform
  1. Windows
I have a check register file. My header use to look something like this:
Screenshot 2024-06-30 073929.jpg


Now it looks like this:
Screenshot 2024-06-30 074957.jpg


I'm only talking about the Font sizes, bold and underline for the Left and the Center headers. Ignore the values.
I read online to update my printer drivers, but if I open an older version of the file, it works, but the newer version doesn't work.
I have NO idea what changed and why the header is suddenly not working.

Here is my macro which has not changed between the 2 files..
The GREEN lines are trial and error attempts.

VBA Code:
Sub RegisterHeader()
'   Format Data in Header
    Application.ActiveSheet.PageSetup.LeftHeader = ""
    Application.ActiveSheet.PageSetup.CenterHeader = ""
    Application.ActiveSheet.PageSetup.RightHeader = ""
    Application.ActiveSheet.PageSetup.LeftFooter = ""
    Application.ActiveSheet.PageSetup.CenterFooter = ""
    Application.ActiveSheet.PageSetup.RightFooter = ""

    Application.ActiveSheet.PageSetup.BottomMargin = Application.InchesToPoints(0.5)
    Application.ActiveSheet.PageSetup.TopMargin = Application.InchesToPoints(1)
    
    Application.ActiveSheet.PageSetup.LeftHeader = "&""Arial""&20" & "Printed on " & Format(Date, "m/d/yyyy") & " at " & Format(Time, "h:mm AM/PM") & _
    Chr$(10) & "&16" & "Closing: " & Format(ActiveSheet.Range("H9").Value, "$#,##0.00   ") & "Cleared: " & Format(ActiveSheet.Range("H11").Value, "$#,##0.00   ") & _
    Chr$(10) & "&14" & "W: " & Format(ActiveSheet.Range("D6").Value, "$#,##0.00 ") & "D: " & Format(ActiveSheet.Range("E6").Value, "$#,##0.00")
    
'    Application.ActiveSheet.PageSetup.LeftHeader = "&""Arial""&20" & "Printed on " & Format(Date, "m/d/yyyy") & " at " & Format(Time, "h:mm AM/PM") & _
    Chr$(10) & "&12" & "Closing: " & Format(ActiveSheet.Range("H9").Value, "$#,##0.00   ") & _
    Chr$(10) & "&12" & "With: " & Format(ActiveSheet.Range("D6").Value, "$#,##0.00   ") & "Dep: " & Format(ActiveSheet.Range("E6").Value, "$#,##0.00   ") & "Net: " & Format(ActiveSheet.Range("H6").Value, "$#,##0.00   ")

    Application.ActiveSheet.PageSetup.CenterHeader = "&""Arial""&B&I&U&24" & "Bank Check Register" & _
    Chr$(10) & "&B&I&U&20" & "Account: 1234-56789"

'    Application.ActiveSheet.PageSetup.RightHeader = "&""Arial""&20" & Format(ActiveSheet.Range("J1").Value, "$#,##0.00   ") & "    Page &P of &N   "
    Application.ActiveSheet.PageSetup.RightHeader = "&""Arial""&20" & "Page &P of &N   " & _
    Chr$(10) & Format(ActiveSheet.Range("J1").Value, "$#,##0.00   ")
    
'    Application.ActiveSheet.PageSetup.RightHeader = "&""Arial""&12" & _
    "Grand Total = " & Format(ActiveSheet.Range("C28").Value, "$#,##0.00   ")
    
'    Application.ActiveSheet.PageSetup.LeftFooter = "&""Arial""&16" & "Withdrawals Total: " & Format(ActiveSheet.Range("D6").Value, "- $#,##0.00   ") & "Deposits Total: " & Format(ActiveSheet.Range("E6").Value, "$#,##0.00   ")
    
End Sub
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
It sounds as if the new printer driver does not support the fonts used. But as your font is Ariel, that would be totally weird, as it is the most used font in the world. What happens if you make another printer your default printer?
 
Upvote 0
I don't think it could be the printer driver, because I'll tell you why.
I have an older version of the same file, and without changing anything regarding the printer, the header works fine.
I compared the macro in the old file with the macro now, and it is identical.
In fact, just to make sure, I copied the macro from the older file into the newer file, and I'm still having this problem.
 
Upvote 0
What happens when you rename the current report sheet and copy the old report sheet into this workbook? (Right click the sheet tab, move/copy, select workbook, tick make copy box)
 
Upvote 0
I don't understand your question.
My current workbook is called Finances.xlsm, the sheet name is called checking.
The old workbook is called Finances-20240520.xlsm with the same worksheet name.

Finances-20240520.xlsm works fine. But that worksheet only has data up to 5/20/24.
 
Upvote 0
What I meant was: copy a sheet (with the proper formatting) from Finances-20240520.xlsm into Finances.xlsm and run the macro on it. Does it then misbehave? And visa versa.

If so, then rebuild a new workbook using Finances-20240520.xlsm and copy the new data into it.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top