Skip to content

Latest commit

 

History

History
60 lines (37 loc) · 1.27 KB

Excel.LineFormat.InsetPen.md

File metadata and controls

60 lines (37 loc) · 1.27 KB
title api_name ms.assetid ms.date ms.localizationpriority
LineFormat.InsetPen property (Excel)
Excel.LineFormat.InsetPen
7a9999ad-b3a5-bae5-e068-8d85cab5ecb5
04/30/2019
medium

LineFormat.InsetPen property (Excel)

Returns or sets whether lines are drawn inside the specified shape's boundaries. Read/write.

Syntax

expression.InsetPen

expression A variable that represents a LineFormat object.

Return value

MsoTriState

Remarks

msoTrue (-1) if lines are drawn inside the shape's boundaries; otherwise, msoFalse (0).

Example

The following code example adds two rectangles to the active worksheet, the first with its lines drawn inside its boundaries, and the second with its lines drawn on its boundaries.

Dim shpNew As Shape 
 
With ActiveSheet.Shapes 
 Set shpNew = .AddShape(Type:=msoShapeRectangle, _ 
 Left:=200, Top:=150, Width:=150, Height:=100) 
 With shpNew.Line 
 .Weight = 24 
 .InsetPen = msoTrue 
 End With 
 
 Set shpNew = .AddShape(Type:=msoShapeRectangle, _ 
 Left:=200, Top:=300, Width:=150, Height:=100) 
 With shpNew.Line 
 .Weight = 24 
 .InsetPen = msoFalse 
 End With 
End With

[!includeSupport and feedback]