CsJHUN
Active Member
- Joined
- Jan 13, 2015
- Messages
- 360
- Office Version
- 365
- 2021
- 2019
- Platform
- Windows
- Mobile
Hi guys,
Yesterday i had a job to make a vba to pagination. That was the working results.
By solving this "problem" some questions comes up:
- i cannot set it like the below code, because the right always pulled the left and centre together in centre. Why? Its a bug or feature? Or i missed something?
- the prefixes (&B ...&K...&J) made me curious because this is the first letters of the Hungarian version of the left (bal), center (közép) and right (jobb). Is this letters fits to any other language? I know Charles Simony is Hungarian, and the leader of programing the excel (and word), but never imagined and easeregg like this.
Any opinion are welcome
Yesterday i had a job to make a vba to pagination. That was the working results.
Code:
Sub sheetcounter()
For i = 2 To Sheets.Count
Sheets(i).Select
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.RightHeader = "&B &Kpch&J" & ActiveSheet.Index - 1 & "\" & Sheets.Count - 1
End With
Application.PrintCommunication = True
Next i
End Sub
By solving this "problem" some questions comes up:
- i cannot set it like the below code, because the right always pulled the left and centre together in centre. Why? Its a bug or feature? Or i missed something?
Code:
With ActiveSheet.PageSetup
.LeftHeader = "someinleft"
.CenterHeader = "someincentre"
.RightHeader = "someinright"
End With
Any opinion are welcome