Previous Document Next Document
Shape.Next

Property Next([Level As cdrShapeLevel = cdrLevelPage], [EnterGroups As Boolean = False], [Loop As Boolean = True]) As Shape

Member of Shape

The Next property returns the next shape in the document.

The Next property returns a read-only value.

Parameters
Description
Level
Specifies if the scope should be limited to the current group, layer, page, or document
This parameter is optional, and its default value is cdrLevelPage (3).
EnterGroups
If set to False, groups are treated as separate shapes, ignoring any shapes within the group. If set to True, group shapes are still returned.
This parameter is optional, and its default value is False.
Loop
If set to True and the last shape in the scope is reached, the first shape of the group/layer/document is returned. Otherwise, Nothing is returned.
This parameter is optional, and its default value is True.

The following code example selects the next shape on a current layer, entering groups as necessary:

Sub Test() 
 Dim s As Shape 
 Set s = ActiveShape 
 If s Is Nothing Then 
  MsgBox "Nothing is selected." 
 Else 
  s.Next(cdrLevelLayer, True, True).CreateSelection 
 End If 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.