Item property (Shapes)

Returns a Shape object based on its Name property or position (ZOrderPosition property) within the specified Shapes collection. Read-only.

Applies to

Collections:  Shapes

Syntax

object.Item(Index)

Parameters

Part Description
object Required. An expression that returns a Shapes collection.
Index Required Variant. The name of the shape, or an integer representing the index number of the shape within the collection, ordered from back to front. If name is used, returns the first shape with that name.

Remarks

The Item property is the default property for the Shapes collection.

Example

    Sub FillOval()

  Dim objApp As New MapPoint.Application   Dim objMap As MapPoint.Map   Dim objLoc As MapPoint.Location
  'Set up application and get a Location object   Set objMap = objApp.ActiveMap   objApp.Visible = True   objApp.UserControl = True   Set objLoc = objApp.ActiveMap.GetLocation(0, 0)
  'Create a shape at this location, then zoom to this location   Set objMap.Location = objLoc   objMap.Shapes.AddShape geoShapeOval, objLoc, 50, 30
  'Use Item property to access the shape and fill it   objMap.Shapes.Item(1).Fill.Visible = True
  End Sub