Hello clintonf,
There are 2 type of Charts: Chart Objects and Chart Sheets. you are mixing the 2 in your code. My assumption is you want to create an embedded chart on a particular sheet and then move it to another worksheet. The code below will create an embedded Bar Stacked chart on "Sheet1" and move it to "Sheet2". The source range is on "Sheet1", A1:A10.
Create and Move Embedded Chart
Sub AddBarChart()
Dim Chrt As Object
Set Chrt = ActiveSheet.ChartObjects.Add(Top:=50, Left:=100, Width:=400, Height:=200)
With Chrt.Chart
.ChartType = xlBarStacked
.HasLegend = True
.SetSourceData Source:=Range("A1:A10")
.HasTitle = True
.ChartTitle.Text = "My Chart"
End With
Chrt.Select
Chrt.Chart.Location xlLocationAsObject, "Sheet2"
End Sub
Sincerely,
Leith Ross
Bookmarks