工作表标签
[示例01] 设置工作表标签的颜色
Sub SetSheetTabColor()
MsgBox "设置当前工作表标签的颜色"
ActiveSheet.Tab.ColorIndex = 7
End Sub
[示例02]恢复工作表标签颜色
Sub SetSheetTabColorDefault()
MsgBox "将当前工作表标签颜色设置为默认值"
ActiveSheet.Tab.ColorIndex = -4142
End Sub
[示例03]交替隐藏或显示工作表标签
Sub HideOrShowSheetTab()
MsgBox "隐藏/显示工作表标签"
ActiveWindow.DisplayWorkbookTabs = Not ActiveWindow.DisplayWorkbookTabs
End Sub