Excel) (Worksheet.Tab 屬性
會傳回工作表的 Tab 物件。
語法
運算式。選項 卡
表達 代表 Worksheet 物件的 變數。
範例
在這個範例中,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
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。