Index Property

Applies To

Section object.

Description

Returns the index number of the Section object within the Sections collection.
Read-only Long.

Remarks

All sections, whether visible or hidden, are included in the index count.

To change the order of sections, use the Move method.

Example

This example determines whether the active section is the first section in Binder1.obd. If it is, the example moves the first section and places it after the third section.

Set myBinder = GetObject("C:\Binder1.obd", "OfficeBinder.Binder")
myBinder.Visible = True
If myBinder.ActiveSection.Index = 1 Then
    myBinder.ActiveSection.Move after:=3
End If