使用VBA隐藏Excel工作表 [英] Hiding an Excel worksheet with VBA
问题描述
是否有一种方式将其以pprogrammatically方式隐藏,其中包含这些公式?
要从UI中隐藏,请使用格式>工作表>隐藏
,请使用 Worksheet
对象的 Visible
属性。如果您以编程方式执行,您可以将该表格设置为非常隐藏,这意味着它不能通过UI取消隐藏。
ActiveWorkbook.Sheets(Name)。Visible = xlSheetVeryHidden
'或xlSheetHidden或xlSheetVisible
您还可以通过VBA IDE中的工作表的属性窗格( ALT + F11 )设置Visible属性。
I have an Excel spreadsheet with three sheets. One of the sheets contains formulas for one of the other sheets.
Is there is a way of hiding it that sheet pprogrammatically, which contains these formulas?
To hide from the UI, use Format > Sheet > Hide
To hide programatically, use the Visible
property of the Worksheet
object. If you do it programatically, you can set the sheet as "very hidden", which means it cannot be unhidden through the UI.
ActiveWorkbook.Sheets("Name").Visible = xlSheetVeryHidden
' or xlSheetHidden or xlSheetVisible
You can also set the Visible property through the properties pane for the worksheet in the VBA IDE (ALT+F11).
这篇关于使用VBA隐藏Excel工作表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!