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

Cross posted since I have gotten no responce in
microsoft.public.excel.programming for 3 days

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.misc,microsoft.public.excel
external usenet poster
 
Posts: 2,718
Default recalculate page breaks after setting Zoom in pagesetup

Does this help?:

With Sheet1.PageSetup
.Zoom = 65
.PaperSize = .PaperSize
End With


--
Jim
"Par" wrote in message
oups.com...
| Cross posted since I have gotten no responce in
| microsoft.public.excel.programming for 3 days
|
| 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
|


  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel
external usenet poster
 
Posts: 42
Default recalculate page breaks after setting Zoom in pagesetup

Jim,
That is incredible. It works but I have no idea why. It is such an
obvious solution I don't know why I didn't think of it (NOT)

So I looked up the doc on papersize and it sure doesn't say anything
(surprising isn't it) that would lead me to try this.

Thanks a lot. I have been fighting this problem in my spare time for
over a week

Pete

On Jun 21, 7:45 am, "Jim Rech" wrote:
Does this help?:

With Sheet1.PageSetup
.Zoom = 65
.PaperSize = .PaperSize
End With

--
Jim"Par" wrote in message

oups.com...
| Cross posted since I have gotten no responce in
| microsoft.public.excel.programming for 3 days
|
| 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
|



  #4   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel
external usenet poster
 
Posts: 2,718
Default recalculate page breaks after setting Zoom in pagesetup

Glad it works. I tried it on a lark. Just got lucky.

--
Jim
wrote in message
oups.com...
| Jim,
| That is incredible. It works but I have no idea why. It is such an
| obvious solution I don't know why I didn't think of it (NOT)
|
| So I looked up the doc on papersize and it sure doesn't say anything
| (surprising isn't it) that would lead me to try this.
|
| Thanks a lot. I have been fighting this problem in my spare time for
| over a week
|
| Pete
|
| On Jun 21, 7:45 am, "Jim Rech" wrote:
| Does this help?:
|
| With Sheet1.PageSetup
| .Zoom = 65
| .PaperSize = .PaperSize
| End With
|
| --
| Jim"Par" wrote in message
|
| oups.com...
| | Cross posted since I have gotten no responce in
| | microsoft.public.excel.programming for 3 days
| |
| | 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
| |
|
|


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
setting page breaks for whole spreadsheet to be consistent? Mickey Setting up and Configuration of Excel 1 May 15th 07 12:50 AM
Setting page breaks in Excel - drag and drop Pretzil Excel Discussion (Misc queries) 1 October 13th 06 11:15 PM
having trouble setting page breaks on excel- have ms 2000 Jen Excel Discussion (Misc queries) 0 April 20th 05 02:29 PM
Are conditional formats available for setting page breaks? Nicky Armstrong Excel Discussion (Misc queries) 1 February 20th 05 03:51 PM
PageSetup.LeftFooter only on last Page Andy Excel Worksheet Functions 3 December 6th 04 01:53 PM


All times are GMT +1. The time now is 07:49 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"