Skip to content
本页内容

Visible (属性)

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

示例

python
#本示例显示活动工作表的第一个形状线条是否可见
def test():
    line = ActiveSheet.Shapes.Item(1).Line
    print(line.Visible == msoTrue)
python
#本示例设置第一张工作表中第二个形状线条不可见
def test():
    line = Worksheets.Item(1).Shapes.Item(2).Line
    line.Visible = msoFalse