NamedRange.EntireRow, propriété

Obtient un Microsoft.Office.Interop.Excel.Range qui représente la totalité de la ligne ou des lignes qui contiennent le contrôle NamedRange.

Espace de noms :  Microsoft.Office.Tools.Excel
Assembly :  Microsoft.Office.Tools.Excel (dans Microsoft.Office.Tools.Excel.dll)

Syntaxe

'Déclaration
ReadOnly Property EntireRow As Range
Range EntireRow { get; }

Valeur de propriété

Type : Microsoft.Office.Interop.Excel.Range
Microsoft.Office.Interop.Excel.Range qui représente la totalité de la ligne ou des lignes qui contiennent le contrôle NamedRange.

Exemples

L'exemple de code suivant crée un NamedRange, puis affecte la couleur verte à la bordure des colonnes et des lignes qui contiennent NamedRange.

Cet exemple illustre une personnalisation au niveau du document.

Private entireRowAndColumnRange As Microsoft.Office.Tools.Excel.NamedRange

Private Sub HighlightColumnAndRow()
    entireRowAndColumnRange = Me.Controls.AddNamedRange( _
        Me.Range("C3", "E5"), "entireRowAndColumnRange")

    ' Set the style of the column and row borders to xlSlantDashDot.
    Me.entireRowAndColumnRange.EntireColumn.Borders.LineStyle = _
        Excel.XlLineStyle.xlSlantDashDot
    Me.entireRowAndColumnRange.EntireRow.Borders.LineStyle = _
        Excel.XlLineStyle.xlSlantDashDot
End Sub
Microsoft.Office.Tools.Excel.NamedRange entireRowAndColumnRange;
private void HighlightColumnAndRow()
{
    entireRowAndColumnRange = this.Controls.AddNamedRange(
        this.Range["C3", "E5"], "entireRowAndColumnRange");

    // Set the style of the column and row borders to xlSlantDashDot.
    this.entireRowAndColumnRange.EntireColumn.Borders.LineStyle = 
        Excel.XlLineStyle.xlSlantDashDot;
    this.entireRowAndColumnRange.EntireRow.Borders.LineStyle = 
        Excel.XlLineStyle.xlSlantDashDot;
}

Sécurité .NET Framework

Voir aussi

Référence

NamedRange Interface

Microsoft.Office.Tools.Excel, espace de noms