In the attachment, there are a lot of settings done by code as for page setup using such a code
Code: Select all
Application.PrintCommunication = False
With .PageSetup
.PrintTitleRows = "$1:$1"
.LeftMargin = Application.InchesToPoints(0)
.RightMargin = Application.InchesToPoints(0)
.TopMargin = Application.InchesToPoints(0)
.BottomMargin = Application.InchesToPoints(0)
.CenterHorizontally = True
.FitToPagesWide = 1
.FitToPagesTall = 0
End With
Application.PrintCommunication = True
For example, item 12 in the worksheet is at page 1 and page 2. How can I control this by code to make the item either in page1 or if it is not possible to make it in page2
Simply the item should be in one page, not separated in two pages
Posted here too
https://www.excelforum.com/excel-progra ... setup.html