![]() 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. 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. When printing worksheets that contain a large number of rows, it is a good idea to separately set the print titles and print area so that each page is. There are a delivery notes in my Worksheets: Excel delivery notes 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. Selection.I have a worksheet in Excel with several pages. FooterMargin = Application.InchesToPoints(0.3) HeaderMargin = Application.InchesToPoints(0.3) BottomMargin = Application.InchesToPoints(0.75) TopMargin = Application.InchesToPoints(0.75) RightMargin = Application.InchesToPoints(0.7) ![]() LeftMargin = Application.InchesToPoints(0.7) If it is not cleared and you want to print a highlighted selection at the same time that you have page numbers in place you will get the error message shown. 'below is recorded macro of print selected area Go to Page Layout > Page Setup > Print Area > Set Print Area. Wb1.Sheets("Sheet1").Range("A1:K41").Select ' select the range Select the range of cells that you want to set as the print area in that Excel worksheet. Set wb1 = Workbooks.Open(FolderPath
0 Comments
Leave a Reply. |