从集合中返回一个对象。
语法
表达式.Item(Index)
表达式 一个代表 CustomProperties 对象的变量。
参数
名称 |
必选/可选 |
数据类型 |
说明 |
Index |
必选 |
Variant |
对象的名称或索引号。 |
示例
下例演示了该功能。在此示例中,ET 向活动工作表添加标识符信息,并向用户返回名称和值。
示例代码 |
function CheckCustomProperties() {
let wksSheet1 = Application.ActiveSheet
// Add metadata to worksheet.
wksSheet1.CustomProperties.Add("Market", "Nasdaq")
// Display metadata.
let cusProperties = wksSheet1.CustomProperties.Item(1)
MsgBox(cusProperties.Name + "\t" + cusProperties.Value)
}
|