I have sheet with few thousand rows and I need put border on each end of page of PrintArea
(there is also other formating but not important for this question).
Macro code is in excel file loaded from XLSTART and Oracle Forms software (via WebUtil) which generate a worksheet with data.
So when excel sheet has been wrote, webutil fire a macro (which is loaded by excel start) and it format a sheet.
I have solution with "for each cell" but when code is executed automatically, it detect HPageBreak, but first HPB miss for +2 rows
then next for +4 rows, +6 rows, and so on.
If I start manually macro, it work just fine.
Where I have problem, I'm unable to figure out what cause problem or I miss something?
Code I use:
Bookmarks