主题
Item (方法)
从集合中返回一个对象,包含在集合中的一个 Comment 对象。
参数
属性 | 数据类型 | 必填 | 说明 |
---|---|---|---|
Index | int | 必填 | 对象的索引号。 |
返回值
Comment
示例
python
#本示例隐藏第二条批注
def test():
Application.Worksheets.Item(1).Comments.Item(2).Visible = False
python
#本示例显示活动工作表中第一条批注的内容
def test():
print(Application.ActiveSheet.Comments.Item(1).Text())