PC Review


Reply
Thread Tools Rate Thread

controlling chart location

 
 
festdaddy
Guest
Posts: n/a
 
      12th Mar 2010
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
 
Reply With Quote
 
 
 
 
festdaddy
Guest
Posts: n/a
 
      12th Mar 2010
Never mind, i figured it out. the location you give it with 'addchart'
is the location it will have in the new sheet.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Controlling the window location of an external app SteMc Microsoft VB .NET 1 3rd Jan 2006 02:15 PM
Controlling display location of common dialogs Bill Cernansky Microsoft VB .NET 4 26th Nov 2004 11:05 PM
Controlling MDI app child window's location Steve McLellan Microsoft Dot NET 0 6th Apr 2004 02:48 PM
controlling location of user templates in an image =?Utf-8?B?UGF0IE1lc3NlciAtIENpdHkgb2YgUmVubw==?= Microsoft Word Document Management 1 21st Dec 2003 04:29 PM
Controlling mouse pointer location Dave Leach Microsoft Dot NET Framework Forms 3 1st Nov 2003 10:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:00 AM.