Hello all,

So I found this piece of code and intend to use it to draw a border at page break:

Please Login or Register  to view this content.
Everything is working just fine if Activesheet have 2 pages, but gives me a Runtime error 9 / Subscript out of range if the number of pages to be printed is not equal with the number in this part of code: Resize(2)
So if I have 5 pages, that part should look like this: Resize(5)

Any chance you can help me change the code?
Thank you.