Share via


WorksheetBase.Tab Property

Gets a 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
public Tab Tab { get; }

Property Value

Type: Tab
A 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

See Also

Reference

WorksheetBase Class

Microsoft.Office.Tools.Excel Namespace