I want to put the path and name of a spreadsheet, the page and number of pages and the date and time into the footer(s) and display it in Times New Roman 6 pts.
I made the following macro:
Range("A1").Select
ActiveWindow.View = xlPageLayoutView`
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.LeftFooter = _
"&""Times New Roman,Standaard""&6 &Z&F"
.CenterFooter = _
"&""Times New Roman,Standaard""&6 Page &P of &N"
.RightFooter = _
"&""Times New Roman,Standaard""&6 &D &T"
End With
Application.PrintCommunication = True
ActiveWindow.View = xlNormalView
Range("A1").Select
When I start the macro only a part of the centerfooter is filled.
When I start the same macro step by step everything is filled correctly.
What goes wrong?