Hi all:
I have been attempting to name an embeded chart so that I can set it's location. The problem is that the chart when it is Embedded will not allow me to retain its name. Here is my code.
Thanks!
I have been attempting to name an embeded chart so that I can set it's location. The problem is that the chart when it is Embedded will not allow me to retain its name. Here is my code.
Thanks!
Code:
Charts.Add
With ActiveChart
.Name = "RandomName"
.ChartType = xlXYScatterLines
.SetSourceData Source:=Sheets("Horizontal").Range("EB2:EB4"), _
PlotBy:=xlColumns
.SeriesCollection(1).Delete
.SeriesCollection.NewSeries
.SeriesCollection.NewSeries
.SeriesCollection.NewSeries
.SeriesCollection(1).XValues = ValueXchart
.SeriesCollection(1).Values = Value1chart
.SeriesCollection(1).Name = Value1name
.SeriesCollection(2).XValues = ValueXchart
.SeriesCollection(2).Values = Value2chart
.SeriesCollection(2).Name = Value2name
.SeriesCollection(3).XValues = ValueXchart
.SeriesCollection(3).Values = Value3chart
.SeriesCollection(3).Name = Value3name
.Location Where:=xlLocationAsObject, Name:="Summary"
End With
ActiveChart.ChartArea.Select
ActiveSheet.ChartObject("RandomName").IncrementLeft -165#
ActiveSheet.ChartObject("RandomName).IncrementTop 63.75