Udostępnij za pośrednictwem


NamedRange.Interior Property (2007 System)

Gets an Interior that represents the interior of the NamedRange control.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property Interior As Interior
'Usage
Dim instance As NamedRange 
Dim value As Interior 

value = instance.Interior
[BrowsableAttribute(false)]
public Interior Interior { get; }
[BrowsableAttribute(false)]
public:
property Interior^ Interior {
    Interior^ get ();
}
public function get Interior () : Interior

Property Value

Type: Interior
An Interior that represents the interior of the NamedRange control.

Examples

The following code example uses the Borders property to draw double lines for the border of a NamedRange, and it uses the Interior property to color the interior of a NamedRange green.

This example is for a document-level customization.

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

Private Sub SetBordersAndInterior()
    bordersRange = Me.Controls.AddNamedRange( _
        Me.Range("B2", "D4"), "namedRange1")
    Me.bordersRange.Borders.LineStyle = _
        Excel.XlLineStyle.xlDouble
    Me.bordersRange.Interior.Color = &HFF00
End Sub
Microsoft.Office.Tools.Excel.NamedRange bordersRange;
private void SetBordersAndInterior()
{
    bordersRange = this.Controls.AddNamedRange(
        this.Range["B2", "D4"], "namedRange1");
    this.bordersRange.Borders.LineStyle =
        Excel.XlLineStyle.xlDouble;
    this.bordersRange.Interior.Color = 0xFF00;
}

.NET Framework Security

See Also

Reference

NamedRange Class

NamedRange Members

Microsoft.Office.Tools.Excel Namespace