应用于 PivotCache 对象的 SourceType 属性。
返回一个值,该值用于标识发布项的类型。XlPivotTableSourceType 类型,只读。
| XlPivotTableSourceType 可为以下 XlPivotTableSourceType 常量之一。 |
| xlConsolidation |
| xlDatabase |
| xlExternal |
| xlPivotTable |
| xlScenario |
expression.SourceType
expression 必需。该表达式返回一个 PivotCache 对象。
应用于 PublishObject 对象的 SourceType 属性。
返回一个值,该值用于标识发布项的类型。XlSourceType 类型,只读。
| XlSourceType 可为以下 XlSourceType 常量之一。 |
| xlSourceChart |
| xlSourcePrintArea |
| xlSourceRange |
| xlSourceWorkbook |
| xlSourceAutoFilter |
| xlSourcePivotTable |
| xlSourceQuery |
| xlSourceSheet |
expression.SourceType
expression 必需。该表达式返回一个 PublishObject 对象。
本示例确定保存为 Web 页的第一张图表(在第一个工作簿中)的唯一名称,然后将 Boolean 类型的变量 blnChartFound 设置为 True。如果文档中没有保存为图表组件的项,则 blnChartFound 为 False。
blnChartFound = False
For Each objPO In Workbooks(1).PublishObjects
If objPO.SourceType = xlSourceChart Then
strFirstPO = objPO.Source
blnChartFound = True
Exit For
End If
Next objPO