Chris, doesn't look like anything is wrong with your settings. If A3
wouldn't be a problem, try changing the paper size to A3, from A4
Sam

On Sep 5, 10:24 pm, "Chris Boxall" <ch...@boxall.info> wrote:
> Apparent corruption with .PageSetup.Zoom
>
> I fear that I have corrupted my installation of Excel 2007 (on XP).
>
> Symptoms:
>
> -          Sheets included in a workbook, that also contains my major Excel
> macro (called 'wttWorkBench') now print slightly smaller.
>
> -          'wttWorkBench' operates on (other) pre-existing, separate,
> spreadsheets correctly.
>
> -          Copying a sheet from an existing spreadsheet to a new (empty)
> spreadsheet file results in the print from the new file being a little smaller
> than the original one (although the data is identical in both sheets).
>
> -          The reduction in print size is about (perhaps the same) as the
> .PrintSetup.Zone value of 92 that I have been using.
>
> Recent activities:
>
> -          I have been implementing a VBA print setup SUB within 
> 'wttWorkBench'.
> I suspect that I did something that has changed an Excel default.  When I was
> developing the print setup SUB, I made some errors with the WITH command.
> Possibly, I wrote a ZOOM value to a hidden location within EXCEL.
>
> Diagnostics:
>
> -          When I Print (or PrintPreview) the same data, but in the two
> different worksheets, one is slightly smaller than the other.
>
> -          When I compare the parameters in 'PrintPreview' they are identical 
> in
> both worksheets.  All values are the same - Scaling; PaperSize being the 
> obvious
> ones but all margins are also the same.
>
> -          Checking the WIDTH of the printed area with 'Range'.Width gives the
> same result from both sheets (794.25).
> I attach two files:
>
> o    'originalZoom' which was created several weeks ago.  The sheet is printed
> at 92% zoom to fit onto one page.
>
> o   'testZoom'.  This was created as a new, empty workbook today.  Then sheet
> 'EMF-SMF' was copied from 'originalZoom' into 'testZoom'.  No changes were 
> made
> of any sort.
>
> Investigation:
>
> -          I have been unable to locate a way to set a default Zoom.
>
> -          I suspect that whilst I was developing my code I might have made an
> error in qualifying my '.PageSetup.Zoom' command.  I attach my, now, working 
> SUB
> below.  However, I did have some problems in getting it to work.  That is, I 
> may
> well have executed an incorrect OBJECT on the WITH command.
>
> -          The normal level of ZOOM that I use is 92%.  That is, I need a Zoom
> setting of 92 to print my spreadsheet on the page.
>
> -          My code enables me to set different PrintSetup parameters depending
> on the contents of the sheet.  (the variable is 'wttWTT_Type').  PrintSetup
> values are extracted from arrays of data (defined elsewhere).
>
> Solution:
>
> Unless I can find how Excel is corrupted, I fear that I shall have to 
> reinstall
> EXCEL.
>
> Perhaps I could simply refrain from creating new workbooks - just copy 
> existing
> ones and the delete all of the datasheets!
>
> May be I could create a new TEMPLATE from an existing workbook.
>
> Christopher Boxall (UK)
>
> ________________________________________________________________________________
> ______________________________________
>
> My SUB which is now working is: - Slightly adjusted for clarity
>
> Public Sub wttPageSetup()
>
> '            Set up Printing characteristics     (depends on 'wttWTT_Type')
>
>   With ActiveSheet
>
>     With .PageSetup
>
>       Select Case wttWTT_Type
>
>         Case wttWTT_TypeSvrYear, wttWTT_TypeSvrSpecial
>
>           .PaperSize = lPaperSizes(wttWTT_Type)        ' 9 = 'A4'
>
>           .TopMargin = dTopMargins(wttWTT_Type)
>
>           .BottomMargin = dBottomMargins(wttWTT_Type)
>
>           .CenterHorizontally = bCenterHorizontallys(wttWTT_Type)
>
>           .CenterVertically = bCenterVerticallys(wttWTT_Type)
>
>           .Orientation = iOrientations(wttWTT_Type)    ' 2=Landscape
> ('xlLandscape' only avail Excel 2007 and above)
>
>           .Zoom = iZooms(wttWTT_Type)                  ' Set printer SCALING
>
>       End Select
>
>       .PrintArea = rPanelWholeTable.Address            ' Set up print area. 
> This
> places a dotted boundary line around the area.
>
>     End With
>
>     .DisplayPageBreaks = True                      ' Display Print Border.
>
>   End With
>
> End Sub
>
>  originalZoom.xls
> 110KViewDownload
>
>  testZoom.xls
> 99KViewDownload

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to