Skip to content

Latest commit

 

History

History
51 lines (31 loc) · 1.16 KB

Excel.PageSetup.PrintArea.md

File metadata and controls

51 lines (31 loc) · 1.16 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
PageSetup.PrintArea property (Excel)
vbaxl10.chm473092
vbaxl10.chm473092
Excel.PageSetup.PrintArea
da4d5231-cc74-5940-ffd4-224b78e5244c
05/03/2019
medium

PageSetup.PrintArea property (Excel)

Returns or sets the range to be printed as a String using A1-style references in the language of the macro. Read/write String.

Syntax

expression.PrintArea

expression A variable that represents a PageSetup object.

Remarks

Set this property to False or to the empty string ("") to set the print area to the entire sheet.

This property applies only to worksheet pages.

Example

This example sets the print area to cells A1:C5 on Sheet1.

Worksheets("Sheet1").PageSetup.PrintArea = "$A$1:$C$5"

This example sets the print area to the current region on Sheet1. Note that you use the Address property to return an A1-style address.

Worksheets("Sheet1").Activate 
ActiveSheet.PageSetup.PrintArea = _ 
 ActiveCell.CurrentRegion.Address

[!includeSupport and feedback]