Areas Interface

A collection of the areas, or contiguous blocks of cells, within a selection.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
<InterfaceTypeAttribute()> _
<GuidAttribute("00020860-0000-0000-C000-000000000046")> _
Public Interface Areas _
    Inherits IEnumerable
'Usage
Dim instance As Areas
[InterfaceTypeAttribute()]
[GuidAttribute("00020860-0000-0000-C000-000000000046")]
public interface Areas : IEnumerable

Remarks

There’s no singular Area object; individual members of the Areas collection are Range objects. The Areas collection contains one Range object for each discrete, contiguous range of cells within the selection. If the selection contains only one area, the Areas collection contains a single Range object that corresponds to that selection.

Use the Areas property to return the Areas collection.

Use Areas(index), where index is the area index number, to return a single Range object from the collection. The index numbers correspond to the order in which the areas were selected.

Some operations cannot be performed on more than one area in a selection at the same time; you must loop through the individual areas in the selection and perform the operations on each area separately.

See Also

Reference

Areas Members

Microsoft.Office.Interop.Excel Namespace