Previous Document Next Document

Object Model Reference : Classes : S : ShapeRange : Methods : ShapeRange.IndexOf


ShapeRange.IndexOf

Function IndexOf(Shape As Shape) As Long

Description

Member of ShapeRange

The IndexOf method returns the index number of a specified shape in a shape range. If the shape is not in the range, 0 is returned.

Parameter
Description
Shape
Specifies the shape

VBA example

The following VBA example determines whether the selected shape is a curve residing on the active layer of the document.

Sub Test()
 Dim sr As ShapeRange
 Set sr = ActiveLayer.FindShapes(, cdrCurveShape)
 If sr.IndexOf(ActiveShape) = 0 Then
  MsgBox "The selected shape is not a curve residing on the current layer"
 End If
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.