Object Model Reference : Classes : S : ShapeRange : Methods : ShapeRange.IndexOf |
Function IndexOf(Shape As Shape) As Long
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.
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 |
Copyright 2013 Corel Corporation. All rights reserved.