Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Par Par is offline
external usenet poster
 
Posts: 3
Default recalculate page breaks after setting Zoom in pagesetup

Ok I've seen the 1,000s of people trying to program page setup options
and having a bad time. So let me add more problems.

I was using Excel 2000. I now have 2007. I had a workaround for this
bug in 2000/2003 but I can't seem to get around it in 2007 (and of
course it isn't fixed)

Here is what I'm trying to do:
Set the page to Landscape, 1 page wide
Then add some intelligent page breaks by looking for the automatic
page break and putting a manual break above it where the data recently
changed.

The problem is that the automatic page break is not recalculated after
setting the zoom factor programatically.

if I do:
With ActiveSheet.PageSetup
.Orientation = xlLandscape
.Zoom = 65
End With

the first page break is on row 33

In 2000/2003 I could :
SendKeys "%(FUA)" + Format(ActiveSheet.PageSetup.Zoom) + "~", True

This is a crappy way to get around it but after the sendkeys the first
page break would not be row 53

I cannot get a key stroke method to the page setup dialog box in
Excel2007 to work from sendkeys (I can do it manually but that doesn't
help)

Anybody know how to get Excel to recalculate the page breaks?
Obviously something is being called from teh page setup dialog box
that I can't find directly.

Thanks for any help.
Pete

  #2   Report Post  
Posted to microsoft.public.excel.programming
Par Par is offline
external usenet poster
 
Posts: 3
Default recalculate page breaks after setting Zoom in pagesetup

In 2000/2003 I could :
SendKeys "%(FUA)" + Format(ActiveSheet.PageSetup.Zoom) + "~", True

OK I figured out that they changed the way sendkeys works. In prior
versions if you wanted to do multiple ALT keys without releasing ALT,
you put them in () but in 2007 you don't need to do that so I can
Sendkeys "%PSP%A" + Format(ActiveSheet.PageSetup.Zoom) + "~", True

This is still not a good solution.

I really need to know what is called to process the change from the
page setup so I can call it after changing the zoom

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
recalculate page breaks after setting Zoom in pagesetup Par Excel Discussion (Misc queries) 3 June 21st 07 03:24 PM
setting page breaks. Rod[_2_] Excel Programming 3 May 23rd 06 12:28 AM
Excel VBA: Setting PageSetup.TopMargin for _EACH_ page breakfree Excel Programming 1 October 5th 05 02:45 AM
read ZOOM after setting FitToPagesWide in pagesetup Dave Peterson[_3_] Excel Programming 1 September 3rd 03 11:45 AM
read ZOOM after setting FitToPagesWide in pagesetup richard daniels Excel Programming 1 September 2nd 03 02:07 PM


All times are GMT +1. The time now is 08:10 PM.

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

About Us

"It's about Microsoft Excel"