WorksheetBase.Tab Property
Gets a Microsoft.Office.Interop.Excel.Tab for the worksheet.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)
Syntax
'Declaration
Public ReadOnly Property Tab As Tab
Get
public Tab Tab { get; }
Property Value
Type: Microsoft.Office.Interop.Excel.Tab
A Microsoft.Office.Interop.Excel.Tab for the worksheet.
Examples
The following code example uses the Tab property to set the primary color of the worksheet's tab to blue.
This example is for a document-level customization.
Private Sub SetTabColor()
' Set the color to the RGB value for blue.
Me.Tab.Color = &HFF0000
End Sub
private void SetTabColor()
{
// Set the color to the RGB value for blue.
this.Tab.Color = 0xFF0000;
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.