Macro to Print Always Top and Bottom
I have a sheet with 30 lines. From 1 to 5 we can consider it the TOP section and from 25 to 30 the BOTTOM section. So from 6 to 24 is the fill up area.
This fill up area, with 19 rows, can "grow up" to a number bigger than 19. If the fill up area grows to 22 rows (for example), the Bottom area would be from 28 to 33.
My question : is it possible to have the TOP and BOTTOM areas fixed? With the example above, since the fill up area is bigger than t开发者_高级运维he 6-24 row interval, a 2ºpage would apear with the remaining data. So what i´m looking is a way to fix the TOP and BOTTOM section for 1,2,3 etc...pages, depending of the fill-up area. If anybody could help that would be superb! In other words, i want to fix a certain TOP and Bottom for every prints in a sheet.
I believe using headers / footers isn't an option, right?
If not, then you'll need to define a range for the header and another to the footer, count the amount of rows you have and while it is more than the rows we can have in a page, copy these ranges properly.
It sounds straightforward, but work with prints isn't that simple in VBA.
Maybe someone in our community have a proper code to share with you, as I don't at this moment.
Rgds!
精彩评论