I've got the following VBA in a macro
It should copy the tab name from my excel worksheet and paste it into a string on the left header
It should also paste 'page x of x Pages' at the bottom of each page
For both of these the text copies OK but the Tab bit shows as 'TAB]' and the 'Page &[Page] of &[Pages]' shows as written here until I open and click on the header manually then it does what I want it to
How can I get the MACRO to do the open/close bit for me .... or to just do it properly in the first place?
It should copy the tab name from my excel worksheet and paste it into a string on the left header
It should also paste 'page x of x Pages' at the bottom of each page
For both of these the text copies OK but the Tab bit shows as 'TAB]' and the 'Page &[Page] of &[Pages]' shows as written here until I open and click on the header manually then it does what I want it to
How can I get the MACRO to do the open/close bit for me .... or to just do it properly in the first place?
VBA Code:
With ActiveSheet.PageSetup
.LeftHeader = "Station Workings" & vbCr & "&[Tab]" & vbCr
.RightHeader = "(Re-formatted by on " & Format(Now(), "D MMM YY)")
.CenterFooter = "Page &[Page] of &[Pages]" & vbCr
End With