Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How store PageBrakes locations - Coded pagebrakes are deleted in Workbook_BeforePrint

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
store inventory sheet(ex:sports equipment store) vardan Excel Worksheet Functions 1 October 11th 06 12:51 AM
Formula to return under-budget store locations BeckyRode Excel Worksheet Functions 6 July 6th 06 07:27 AM
Workbook_BeforePrint performs twice ? Peter[_21_] Excel Programming 3 November 29th 04 01:24 AM
Workbook_BeforePrint Squid[_2_] Excel Programming 2 May 11th 04 04:18 PM
Problem - Workbook_BeforePrint JON-JON Excel Programming 3 August 26th 03 01:19 PM


All times are GMT +1. The time now is 01:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"