Skip to content
本页内容

Select (方法)

选择对象。

返回值

Any

示例

python
#本示例选中工作表 Sheet1 中第一个图表的第一个图表组的垂直线
def test():
    droplines = Application.Worksheets.Item("Sheet1").ChartObjects(1).Chart.ChartGroups(1).DropLines
    droplines.Select()
python
#本示例判断如果图表工作表 Chart1 中图表的第一个图表组的垂直线的名称为“垂直线 1”,则选中该垂直线
def test():
    droplines = Application.Charts.Item("Chart1").ChartObjects(1).Chart.ChartGroups(1).DropLines
    if droplines.Name == "垂直线 1":
        droplines.Select()