On a worksheet in excel I have a macro which nicely create a PDF's.
The PDF is on 2 pages in landscape.
What I do need is to have a specific number of columns on the first page, lets say 1 to 15 and columns 16 tot 30 on page 2.
Now sometimes 1 to 12 is on page 1 and 13 to 30 on page 2 or 1 to 17 on page 1 and 18 to 30 on page 2. It is apparently depending on the contents of the columns.
Part of my code where this should be realized is here I suppose, but I can not figure out how to do this.
With ActiveSheet.PageSetup
.PrintTitleRows = "$3:$3"
End With
Application.PrintCommunication = True
ActiveSheet.PageSetup.PrintArea = ""
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.CenterHorizontally = True
.Orientation = xlLandscape
.FitToPagesWide = 0
End With
Application.PrintCommunication = True
Pleased to hear.
Berend-Jan
Bookmarks