移动图表的位置。Chart 对象。
expression.Location(Where, Name)
expression 必需。该表达式返回“应用于”列表中的对象之一。
Where XlChartLocation 类型,必需。图表移动的目标位置。
XlChartLocation 可为以下 XlChartLocation 常量之一。 |
xlLocationAsNewSheet |
xlLocationAsObject |
xlLocationAutomatic |
Name Variant 类型,可选。如果 Where 参数为 xlLocationAsObject,则本参数为必需。如果 Where 参数为 xlLocationAsObject,则本参数指定嵌入该图表的工作表的名称。如果 Where 参数为 xlLocationAsNewSheet,则本参数指定新工作表的名称。
本示例将嵌入图表移至新图表“Monthly Sales”。
Worksheets(1).ChartObjects(1).Chart _
.Location xlLocationAsNewSheet, "Monthly Sales"