应用于 PivotFormula 对象的 Index 属性。
对于 PivotFormula 对象,返回或设置 PivotFormulas 集合中的对象的编号。Long 类型,可读写。
expression.Index
expression 必选。该表达式返回上述对象中的对象之一。
返回对象在其同类对象所组成的集合内的编号。Long 类型,只读。
expression.Index
expression 必需。该表达式返回上述对象中的对象之一。
关于在 Visual Basic 中使用 Index 工作表函数的详细信息,请参阅在 Visual Basic 中使用 Microsoft Excel 工作表函数。
本示例显示输入的工作表名称对应的工作表选项卡编号。 例如,如果 Chart1 为活动工作簿中第三个工作表选项卡,本示例就在消息框中显示“3”。
sheetname = InputBox("Type a sheet name, such as Sheet12")
MsgBox "This sheet is tab number " & Sheets(sheetname).Index