


If ActiveSheet.Cells(productNumber, "C").Value "" ThenīreakAdress = CInt(Mid(, 4, 5))įor productNumber = (breakAdress + 9) To (breakAdress + 60)ĪctiveSheet.PrintOut From:=pageNumber, To:=pageNumber, Copies:=1, Collate:=Trueīut this macro sent a printjob for each page. Click the Page Layout tab on the Ribbon, then select the Print Titles command. I wrote a Makro which iterates over the pagebreakes and check the C-column on every page: Option ExplicitĪctiveSheet.Cells(productNumber, "C").Select Some of them dont have entries in the C-column. There are a delivery notes in my Worksheets: Excel delivery notes So I am using a VBA to print out a multiple selection and at this stage it is causing me issues as it wont shrink to fit one page. In know i can print the pages with the commands:ĪctiveSheet.PrintOut From:=1, To:=1, Copies:=1, Collate:=TrueĪctiveSheet.PrintOut From:=1, To:=3, Copies:=3, Collate:=TrueĪctiveSheet.PrintOut From:=1, To:=4, Copies:=4, Collate:=TrueĪctiveSheet.PrintOut From:=1, To:=6, Copies:=6, Collate:=Trueīut this way, i create a lot of print jobs. Click the Collapse Dialog button next to the Rows to repeat at top: field.

EXCEL PRINT SELECTION TO FIT PAGE CODE
In our example, we'll repeat a row first. Here is a screenshot of where that is in Excel 2013: Tried to look for some VBA code like the following but without success. From here, you can choose rows or columns to repeat on each page. I have a worksheet in Excel with several pages. Click the Page Layout tab on the Ribbon, then select the Print Titles command.
