View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Fred Fred is offline
external usenet poster
 
Posts: 59
Default Page Breaks in Excel

Again a case of yes, but no, not really.

The macro creates a new spreadsheet to contain the report, the default
setting for page layout at this point is Zoom to 100%. Once all the
cells have been populated with data, using the above code finds Zoom
set at 100% (the default), then proceeds to set to landscape but at
100% rather than the actual page width (say 73%).

When I do the process manually Excel opens a new spreadsheet (default
Zoom factor is 100%), populate all the cells and then go to Page Setup,
change from Zoom to Fit To 1 page wide and OK. Excel, somehow,
updates the Zoom value at this point with the Zoom factor to achieve
the 1 page wide requirement, so that I can then go back into Page Setup
and change from Fit To back to Zoom and it will have the correct Zoom
factor for fitting to 1 page wide. The VB coding does not seem able to
pick this up and I think that unless there is somewhere else to pick up
the Zoom figure from (while Fit To is active) it will always come up
with the result of False because it has been told to "Fit To" so Zoom
will be false, if you see what I mean.

I suppose my question now is "When Fit To is active, is there somewhere
that I can pick up the Zoom factor from without getting an answer of
False because Fit To is active"

Regards and thanks for all your help
Fred