Condividi tramite


Proprietà XmlMappedRange.CurrentRegion

Ottiene un oggetto Range che rappresenta l'area corrente.

Spazio dei nomi:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

Sintassi

'Dichiarazione
ReadOnly Property CurrentRegion As Range
Range CurrentRegion { get; }

Valore proprietà

Tipo: Microsoft.Office.Interop.Excel.Range
Oggetto Range che rappresenta l'area corrente.

Note

L'area corrente è un intervallo delimitato da una qualsiasi combinazione di righe e di colonne vuote.

Questa proprietà non può essere utilizzata in un foglio di lavoro protetto.

Esempi

Nell'esempio di codice riportato di seguito viene utilizzata la proprietà CurrentRegion per applicare il colore verde all'area interna di un controllo XmlMappedRange.Nell'esempio si presuppone che il foglio di lavoro corrente contenga un controllo XmlMappedRange denominato CustomerLastNameCell.

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

Sicurezza di .NET Framework

Vedere anche

Riferimenti

XmlMappedRange Interfaccia

Spazio dei nomi Microsoft.Office.Tools.Excel