ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I repeat a column when printing in a macro? (https://www.excelbanter.com/excel-programming/323790-how-do-i-repeat-column-when-printing-macro.html)

Taxman

How do I repeat a column when printing in a macro?
 
I am using a 53x27 worksheet with a print macro designed by someone in my
office. The first column contains information I would like to print on each
of the 3 pages that prints out. This is how it looks now:

ActiveSheet.PageSetup.PrintArea = "$a$6:$n$42"
ActiveWindow.SelectedSheets.PrintPreview
ActiveSheet.PageSetup.PrintArea = "$o$6:$aa$42"
ActiveWindow.SelectedSheets.PrintPreview
ActiveSheet.PageSetup.PrintArea = "$a$46:$m$53"
ActiveWindow.SelectedSheets.PrintPreview

I want the a6:a42 range to print on each page along with the above print
areas.


Rowan[_2_]

How do I repeat a column when printing in a macro?
 
Try adding

With ActiveSheet.PageSetup
.PrintTitleColumns = "$A:$A"
End With

Rowan

"TaxMan" wrote:

I am using a 53x27 worksheet with a print macro designed by someone in my
office. The first column contains information I would like to print on each
of the 3 pages that prints out. This is how it looks now:

ActiveSheet.PageSetup.PrintArea = "$a$6:$n$42"
ActiveWindow.SelectedSheets.PrintPreview
ActiveSheet.PageSetup.PrintArea = "$o$6:$aa$42"
ActiveWindow.SelectedSheets.PrintPreview
ActiveSheet.PageSetup.PrintArea = "$a$46:$m$53"
ActiveWindow.SelectedSheets.PrintPreview

I want the a6:a42 range to print on each page along with the above print
areas.


Taxman

How do I repeat a column when printing in a macro?
 
Worked perfectly. Thanks.

"Rowan" wrote:

Try adding

With ActiveSheet.PageSetup
.PrintTitleColumns = "$A:$A"
End With

Rowan

"TaxMan" wrote:

I am using a 53x27 worksheet with a print macro designed by someone in my
office. The first column contains information I would like to print on each
of the 3 pages that prints out. This is how it looks now:

ActiveSheet.PageSetup.PrintArea = "$a$6:$n$42"
ActiveWindow.SelectedSheets.PrintPreview
ActiveSheet.PageSetup.PrintArea = "$o$6:$aa$42"
ActiveWindow.SelectedSheets.PrintPreview
ActiveSheet.PageSetup.PrintArea = "$a$46:$m$53"
ActiveWindow.SelectedSheets.PrintPreview

I want the a6:a42 range to print on each page along with the above print
areas.



All times are GMT +1. The time now is 05:17 AM.

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