From: festdaddy on 12 Mar 2010 13:11 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
From: festdaddy on 12 Mar 2010 13:57 Never mind, i figured it out. the location you give it with 'addchart' is the location it will have in the new sheet.
|
Pages: 1 Prev: find mac address of my own computer by excell macro Next: Merge multiple worksheets into one |