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

The following will display the zoom value.

Sub displayZoom()
Dim numZoom As Variant
numZoom = ActiveSheet.PageSetup.Zoom
MsgBox numZoom
End Sub

You would just need something like the following to reset the zoom
percentage later.
activesheet.pagesetup.zoom = numzoom


"Fred" wrote:

I've viewed a number of threads regarding Excel's knack of ignoring
page breaks when "Fit to" is used and have seen the suggestions as to
how to overcome this, using Fit to 1 page wide leaving the tall
selection blank, then swapping back to Zoom to, leaving the % value
unchanged.

My question is how would I achieve this in VB ? I've tried the trick
of recording the actions, but that always sets the .Zoom variable, is
there any way to find what the .Zoom is and then use that value in the
page definition ?

Thanks in advance
Fred Newton