Reputation: 1875
Each time that I rn tis code on some Workbook I get double path in the footer of the page. This is realy anoying especially since I do specify in here that center footer should be empty. Can anyone tell me why is this code producing footer where contents or .leftfooter
are replicated in .centerfooter
?
Sub Print_Setup()
Dim CurrentWB As Workbook
Dim Page As Worksheet
Set CurrentWB = ActiveWorkbook
For Each Page In CurrentWB.Worksheets
With Page.PageSetup
.CenterHorizontally = False
'Make sure there is room to make notes on the sides of the page
'Page Margins
.TopMargin = 0
.LeftMargin = 14.4
.RightMargin = 0
.BottomMargin = 18
'Footer
.FooterMargin = 0
.RightFooter = "&8Printed &D: &P of &N"
.CenterFooter = ""
.LeftFooter = "&8&Z&F[&A]"
End With
Next Page
End Sub
Upvotes: 0
Views: 137
Reputation: 821
I ran this macro on my system (Windows 7, Excel 2003) multiple times, and did not find the same behavior.
One thing that I've found is that if you have a long path, it can occupy a lot of real estate at the bottom or top of the page.
What version of Excel are you running, BTW?
Upvotes: 1