Skip to content
本页内容

Item (方法)

从集合中返回一个对象,包含在集合中的一个 Comment 对象。

参数

属性数据类型必填说明
Indexint必填对象的索引号。

返回值

Comment

示例

python
#本示例隐藏第二条批注
def test():
    Application.Worksheets.Item(1).Comments.Item(2).Visible = False
python
#本示例显示活动工作表中第一条批注的内容
def test():
    print(Application.ActiveSheet.Comments.Item(1).Text())