Sections Property

Applies To

Binder object.

Description

Returns a Sections collection that represents all the sections in the specified binder. Read-only.

See Also

Activate method, ActiveSection property.

Example

This example displays the number of Microsoft Excel sections in Binder1.obd.

Set myBinder = GetObject("C:\Binder1.obd", "OfficeBinder.Binder")
wk = 0
For Each s In myBinder.Sections
    If s.Type = "Excel.Sheet.8" Then
        wk = wk + 1
    End If
Next
MsgBox "There are " & wk & " Microsoft Excel sections in this binder."
Set myBinder = Nothing
This example displays the name of the third section in Binder1.obd.

Set myBinder = GetObject("C:\Binder1.obd", "OfficeBinder.Binder")
MsgBox myBinder.Sections(3).Name
Set myBinder = Nothing