XL5: PageSetup.Zoom Does Not Work with Some Printers

ID: Q151312


The information in this article applies to:


SYMPTOMS

In Microsoft Excel for Windows versions 5.0 and 5.0c, the Zoom property for the PageSetup object may not scale worksheets correctly. The Scaling setting may appear correctly in the Page Setup dialog box, but the actual scaling of the sheet does not occur until you click OK interactively from the Page Setup dialog box.


CAUSE

The Zoom property may not be set correctly if the active printer is a Postscript printer.


WORKAROUND

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Solution Provider or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Solution Providers, please see the following page on the World Wide Web:

http://www.microsoft.com/mcsp/
For more information about the support options available from Microsoft, please see the following page on the World Wide Web:

http://www.microsoft.com/support/supportnet/overview/overview.asp
Using the Microsoft Excel 4.0 "PAGE.SETUP" macro function, you can set the print scaling correctly for the worksheet. The following macro demonstrates how to use this Microsoft Excel 4.0 macro function in a Visual Basic for Applications procedure. The following procedure will set the print scaling of the active worksheet at 25%:

   Sub Print_Scale()
      Application.ExecuteExcel4Macro "PAGE.SETUP(,,,,,,,,,,,,25)"
   End Sub 


STATUS

Microsoft has confirmed this to be a problem in the versions of Microsoft Excel mentioned at the beginning of this article. This problem no longer occurs in Microsoft Excel for Windows 95 version 7.0.


MORE INFORMATION

Your worksheet may not fit exactly on the number of pages you want. You can scale your printed work to fit on more or fewer pages than it would at normal size, or you can specify a certain number of pages for your printed worksheet. You can select both choices by clicking Page Setup on the File menu and setting the scaling on the Page tab.

The Visual Basic property to set this is Zoom, and the Microsoft Excel 4.0 macro language command to set this is PAGE.SETUP. The Microsoft Excel 4.0 macro language commands can also be used in Visual Basic.

For additional information, please see the following articles in the Microsoft Knowledge Base:

Q109976 XL5: Visual Basic and the Excel Version 4.0 Macro Language
To confirm if the active printer is a Postscript printer, follow these steps:
  1. In Microsoft Excel, with a worksheet active, click Page Setup on the File menu.


  2. Click the Options button and click the About button.


If the About dialog box lists a version for "Windows Postscript Printer Driver," then the printer is a Postscript printer.


REFERENCES

Microsoft Excel, version 5.0, "Microsoft Excel User's Guide," Chapter 14, "Setting Up What to Print"

For more information about the Zoom property in Microsoft Excel version 5.0, choose the Search button in Visual Basic Reference Help and type:

Zoom Property

Additional query words: 5.00a 5.00c


Keywords          : kbprint kbdta kbdtacode OffVBA KbVBA xlwin 
Version           : WINDOWS:5.0,5.0c
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: July 28, 1999