controlling chart location

F

festdaddy

I have a process for making some charts, which I then place into
another sheet using 'activechart.location 2, sheetname'. Is there a
way to control where on the new sheet this ends up? If I send several
charts this way, they end up in the same location, so that I have to
drag them over to see them all. Here is the charting portion of my
code:

ActiveSheet.Shapes.AddChart(xlLine, 250, 15, 400,
200).Select
With ActiveChart
.SetSourceData Source:=primeTLAhistorng
.SeriesCollection(1).Name = Cells(2, 26)
.SeriesCollection(1).XValues = range(Cells(3, 25),
Cells(tlachtendrw, 25))
.SeriesCollection.NewSeries
.SeriesCollection(2).Values = TLAhistorng
.SeriesCollection(2).Name = TLAhistoname

.Legend.Position = xlBottom

.HasTitle = True
.ChartTitle.Text = "chart title goes here"
.ChartTitle.Font.Size = 12

.Axes(xlCategory).HasTitle = True
.Axes(xlCategory).AxisTitle.Text = "axis title
goes here"
.Axes(xlCategory).AxisTitle.Font.Size = 10
.Axes(xlCategory).TickLabels.Orientation = 90
.Axes(xlCategory).TickLabels.Font.Size = 8
.Axes(xlCategory).HasMajorGridlines = True

.Axes(xlValue).HasTitle = True
.Axes(xlValue).AxisTitle.Text = "value axis title
goes here"
.Axes(xlValue).AxisTitle.Font.Size = 10
.Axes(xlValue).TickLabels.NumberFormat = "0%"
.Location 2, "Chart_Display"
End With
 
F

festdaddy

Never mind, i figured it out. the location you give it with 'addchart'
is the location it will have in the new sheet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top