With a title like that, its no wonder I haven't been able to find a solution so far!

What I'm trying to achieve is that the spreadsheet prints from page 1 to page x in Sheet1
x is determined by cell B1 in Sheet2 (another macro works out at what point it needs to stop and do the PDF and puts it here)
It then needs to print a PDF based on a hyperlink in cell B1 in Sheet3

I can get it do all of that, but then I need it to go back to the excel print and start again at page x +1 until it reaches the next value of x in cell B2 in Sheet2, then print the PDF hyperlinked in cell B2 in Sheet3.

I could do this all manually setting various page refs which I started with, but the number of pages involved could run into the hundreds and I don't want to type that much code when I think it could do it with some sort of x+1 feature

Sub print_works_order()

Dim drawing1, drawing2, drawing3, drawing4, drawing5 As Integer

drawing1 = Sheets("Sheet2").Range("B1")
drawing2 = Sheets("Sheet2").Range("B2")
'drawing3,4,5 etc range(b3, b4, b5)

Sheets("sheet1").Select
    
    ActiveWindow.SelectedSheets.PrintOut copies:=1, collate:=True, from:=1, to:=drawing1

'the next bit is the code to print the pdf drawing (not shown as its quite long) which works and is based on using:
zFile = Sheets("Sheet3").Range("B1")
It then needs to resume excel printing at page drawing1 + 1 until it reaches drawing2 value then print the next PDF of zFile in Sheet3.Range(B2) then back to excel again until every page is printed.

I hope all of this makes sense!