如何基于可见/非隐藏工作表的选项卡颜色进行打印 [英] How to print based on Tab Color of Visible/Non-Hid Worksheets
问题描述
我正在尝试根据可见和标签颜色打印某些工作表。目前,我正在使用以下代码仅在单元格数据为"是"时才显示工作表。我输入的工作表格式化我想要的输出"输出"。工作表。
我的输入和输出标签颜色不同,我想要打印我的"输出"字样。具有"蓝色"的页面标签颜色。这可能吗?
I am trying to print certain worksheets based upon if visible and tab color. Currently, I am using the below code to display worksheets only if cell data is "Yes". I have input worksheets that format to how I want in my "output" worksheets. My input and output tab colors are different and I am wanting to print my "output" pages that have "blue" tab color. Is this possible?
如果[B1] ="是"然后
表格("GL")。可见=真
否则
表格("GL")。可见=假
结束如果
如果[B1] ="是"然后
表格("GL输出")。可见=真
否则
表格("GL输出")。可见=假
结束如果
If [B1] = "Yes" Then
Sheets("GL").Visible = True
Else
Sheets("GL").Visible = False
End If
If [B1] = "Yes" Then
Sheets("GL Output").Visible = True
Else
Sheets("GL Output").Visible = False
End If
谢谢!
推荐答案
记录一个宏,你应用你正在使用的特定蓝色 - 找出要检查的颜色 - 并使用这样的代码,替换xlThemeColorLight2 使用录制的宏中的值。
Record a macro where you apply the specific blue that you are using - to find out the color to check for - and use code like this, replacing xlThemeColorLight2 with the value from your recorded macro.
这篇关于如何基于可见/非隐藏工作表的选项卡颜色进行打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!