AddRectangle

The AddRectangle method adds a new rectangle or rounded rectangle. Returns a Rectangle object.

 

Syntax

object.AddRectangle( Left, Top, Right, Bottom, RoundCorner, UnitType )

 

Parameter

Type

Description

Left

Double

required; left coordinate in page units

Top

Double

required; top coordinate in page units

Right

Double

required; right coordinate in page units

Bottom

Double

required; bottom coordinate in page units

RoundCorner

Boolean

optional; true to round the corners

UnitType

MVCoordDisplayUnits

optional; unit type, default is mvCoordDisplayUnitPageUnits

 

Example

This example demonstrates how to create a rectangle.

 

Dim Rectangle As Object

Set Rectangle = MapShapes.AddRectangle(Left:=9, Top:=8, Right:=10.5, Bottom:=4.5, RoundCorner:=True)

 

Used by: Shapes collection