Tab 属性

       

返回一个图表或工作表的 Tab 对象。

expression.Tab

expression   必需。该表达式返回“应用于”列表中的对象之一。

示例

在本示例中,Microsoft Excel 判断工作表的第一个标签的颜色索引是否设置为无,并通知用户。

Sub CheckTab()

    ' Determine if color index of 1st tab is set to none.
    If Worksheets(1).Tab.ColorIndex = xlColorIndexNone Then
        MsgBox "The color index is set to none for the 1st " & _
            "worksheet tab."
    Else
        MsgBox "The color index for the tab of the 1st worksheet " & _
            "is not set none."
    End If

End Sub