Hi,
I am having trouble keeping the header & footer a constant size, as this is scaled when you scale the print range (yes it's part of the page!)
I found the following code but i get an error with "NewSize = Application.Min(DefaultSize / .Zoom * 100, 99)"
Can anyone suggest any code or fix the below?
Sub ResizeFooter()
Dim isN As Long
Dim NewSize As Long
Const DefaultSize = 20
With ActiveSheet.PageSetup
NewSize = Application.Min(DefaultSize / .Zoom * 100, 99)
On Error Resume Next
isN = 1 ^ Mid(.CenterFooter, 3, 1) 'is 3rd char number? (fontsize > 9)
On Error GoTo 0
.LeftFooter = "&" & NewSize & Mid(.LeftFooter, 3 + isN)
.CenterFooter = "&" & NewSize & Mid(.CenterFooter, 3 + isN)
.RightFooter = "&" & NewSize & Mid(.RightFooter, 3 + isN)
End With
End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks