Skip to content
本页内容

Visible (属性)

返回或设置一个 Any 值,它确定对象是否可见。

示例

python
#此示例将名称为“Sheet2”和“Sheet3”的工作表设置为不可见
def test():
    names = ["Sheet2", "Sheet3"]
    Application.Sheets.Item(names).Visible = msoFalse
python
#此示例将活动工作簿中索引为1和2的工作表设置为可见
def test():
    names = [1, 2]
    Application.ActiveWorkbook.Sheets.Item(names).Visible = msoTrue