View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default How store PageBrakes locations - Coded pagebrakes are deleted in Workbook_BeforePrint

That line won't affect your pagebreaks. Perhaps you are using fit to print
which ignores pagebreaks.

--
Regards,
Tom Ogilvy

"Marie J-son" wrote in message
...
Hi,

I have several rows hidden at different areas and many defined

pagebrakes -
about 25 of them.
When I run this line in Workbook_BeforePrint the printout areas will be

ok,
but the line sweep away all my pagebrakes! How can I keep the pagebrakes

as
they should???

...
Sheet1.PageSetup.PrintArea = Sheet1.Range(Cells(1, 1),
Cells(Sheet1.Range("bpAfSeTab").Row - 1,
15)).SpecialCells(xlVisible).Address
...

(bpAfFiTab = cell reference in the A:A column that tell where the end is,
dynamic because of tables of dynamic sizes)


Regards