Export (0) Print
Expand All

Chart.Location Method (Excel)

Moves the chart to a new location.

expression .Location(Where, Name)

expression An expression that returns a Chart object.

Parameters

Name

Required/Optional

Data Type

Description

Where

Required

XlChartLocation

Where to move the chart.

Name

Optional

Variant

Required if Where is xlLocationAsObject. The name of the sheet where the chart will be embedded if Where is xlLocationAsObject or the name of the new sheet if Where is xlLocationAsNewSheet.

Return Value

Chart

This example moves the embedded chart to a new chart sheet named "Monthly Sales."

Worksheets(1).ChartObjects(1).Chart _ 
 .Location xlLocationAsNewSheet, "Monthly Sales"

Concepts

Other resources

Show:
© 2014 Microsoft