Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 1.17 KB

Excel.Range.WrapText.md

File metadata and controls

44 lines (27 loc) · 1.17 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Range.WrapText property (Excel)
vbaxl10.chm144221
vbaxl10.chm144221
Excel.Range.WrapText
5e61b704-af16-7bad-5eeb-f163e3035513
05/11/2019
medium

Range.WrapText property (Excel)

Returns or sets a Variant value that indicates if Microsoft Excel wraps the text in the object.

Syntax

expression.WrapText

expression A variable that represents a Range object.

Remarks

This property returns True if text is wrapped in all cells within the specified range, False if text is not wrapped in all cells within the specified range, or Null if the specified range contains some cells that wrap text and other cells that don't.

Microsoft Excel will change the row height of the range, if necessary, to accommodate the text in the range.

Example

This example formats cell B2 on Sheet1 so that the text wraps within the cell.

Worksheets("Sheet1").Range("B2").Value = _ 
 "This text should wrap in a cell." 
Worksheets("Sheet1").Range("B2").WrapText = True

[!includeSupport and feedback]