NamedRange.Interior Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets an Interior that represents the interior of the NamedRange control.
public:
property Microsoft::Office::Interop::Excel::Interior ^ Interior { Microsoft::Office::Interop::Excel::Interior ^ get(); };
public Microsoft.Office.Interop.Excel.Interior Interior { get; }
member this.Interior : Microsoft.Office.Interop.Excel.Interior
Public ReadOnly Property Interior As Interior
Property Value
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.
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;
}
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