Thank you p45Cal.
There are issues when I pasted the code to the actual data sheet.
1. The code took several seconds to do its job and the sheet was "dancing" during execution. The actual sheet has several columns populated with formulae. Only columns B to H need to be printed in a report that is why I only showed cols B to H in the mock up data.
2. After running the code, the sheet (actual) ended in a page break view with a message, "subscript out of range." Though when I shifted the sheet to normal, the bottom lines were there.
3. When the page break has a row hidden below it, there was no line in the page break (row 121).
|