Freigeben über


XmlMappedRange.CurrentRegion Property

Definition

Gets a Range that represents the current region.

public:
 property Microsoft::Office::Interop::Excel::Range ^ CurrentRegion { Microsoft::Office::Interop::Excel::Range ^ get(); };
public Microsoft.Office.Interop.Excel.Range CurrentRegion { get; }
member this.CurrentRegion : Microsoft.Office.Interop.Excel.Range
Public ReadOnly Property CurrentRegion As Range

Property Value

A Range that represents the current region.

Examples

The following code example uses the CurrentRegion property to set the color of the interior region of an XmlMappedRange to green. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

private void ColorCurrentRegion()
{
    // Set the color of the region to the RGB value for green.
    this.CustomerLastNameCell.CurrentRegion.Interior.Color = 0xFF00;
}
Private Sub ColorCurrentRegion()
    ' Set the color of the region to the RGB value for green.
    Me.CustomerLastNameCell.CurrentRegion.Interior.Color = &HFF00
End Sub

Remarks

The current region is a range bounded by any combination of blank rows and blank columns.

This property cannot be used on a protected worksheet.

Applies to