Zoom Property

Microsoft Excel Visual Basic

Returns or sets a percentage (between 10 and 400 percent) by which Microsoft Excel will scale the worksheet for printing. Applies only to worksheets. Read/write Variant.

expression.Zoom

expression    Required. An expression that returns a PageSetup object.

Remarks

If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled.

All scaling retains the aspect ratio of the original document.

ShowZoom property as it applies to the Window object.

Returns or sets the display size of the window, as a percentage (100 equals normal size, 200 equals double size, and so on). Read/write Variant.

expression.Zoom

expression    Required. An expression that returns a Window object.

Remarks

You can also set this property to True to make the window size fit the current selection.

This function affects only the sheet that's currently active in the window. To use this property on other sheets, you must first activate them.

Example

ShowAs it applies to the PageSetup object.

This example scales Sheet1 by 150 percent when the worksheet is printed.

Worksheets("Sheet1").PageSetup.Zoom = 150