ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   alternating between left and righ headers, odd and even pages or leafs using VBA (https://www.excelbanter.com/excel-programming/373735-alternating-between-left-righ-headers-odd-even-pages-leafs-using-vba.html)

webbygeeza

alternating between left and righ headers, odd and even pages or leafs using VBA
 
I have reports that will printout to 1 or more pages.

I use the following code to determine how many pages there will be

ActiveSheet.VPageBreaks.Count

Is there a way of alternating the position of the header.

I.e.

If page 1 (odd) then

..LeftHeader = "My Header"

RightHeader = ""



Else if even (2,4,6 etc) page then

..LeftHeader = ""

..RightHeader = "My Header"



I am currently printing into one single .pdf with multi pages therein. It is
fine if the header is in the same position but I would like to do something
a little fancy.






Tom Ogilvy

alternating between left and righ headers, odd and even pages or l
 
there is no support for it.

--
Regards,
Tom Ogilvy


"webbygeeza" wrote:

I have reports that will printout to 1 or more pages.

I use the following code to determine how many pages there will be

ActiveSheet.VPageBreaks.Count

Is there a way of alternating the position of the header.

I.e.

If page 1 (odd) then

..LeftHeader = "My Header"

RightHeader = ""



Else if even (2,4,6 etc) page then

..LeftHeader = ""

..RightHeader = "My Header"



I am currently printing into one single .pdf with multi pages therein. It is
fine if the header is in the same position but I would like to do something
a little fancy.







webbygeeza

alternating between left and righ headers, odd and even pages or l
 
Thank you Tom, short and precise.

My guess is then to set up page for printing individually by hide and unhide
columns per print setup.

Best wishes,
Ray

Can stop losing sleepo
"Tom Ogilvy" wrote in message
...
there is no support for it.

--
Regards,
Tom Ogilvy


"webbygeeza" wrote:

I have reports that will printout to 1 or more pages.

I use the following code to determine how many pages there will be

ActiveSheet.VPageBreaks.Count

Is there a way of alternating the position of the header.

I.e.

If page 1 (odd) then

..LeftHeader = "My Header"

RightHeader = ""



Else if even (2,4,6 etc) page then

..LeftHeader = ""

..RightHeader = "My Header"



I am currently printing into one single .pdf with multi pages therein. It
is
fine if the header is in the same position but I would like to do
something
a little fancy.










All times are GMT +1. The time now is 04:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com