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?

I don't see a problem but I don't know what you should be seeing, the following shows what I see

I just noticed this is marked solved, can you please share the solution for me and others to see in the future?

Sub Footer()
    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
End Sub
commented: Thank you +5
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.