LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Anchoring a chart to a certain area


Thanks for the reply. That fixed that problem. I need to be able to
format the chart, i.e. set the x axis, set the legend, put in data
points along the lines of the chart, etc.

Here is what I have so far:

'Anchore the chart to a particular area.
With xlSheet.Range("A" & nChartOffset + 5 & ":E" &
nChartOffset + 15)
xlSheet.ChartObjects.Add(.Left, .Top, .Width,
..Height)
nChartObj += 1
End With

oChartObj = xlSheet.ChartObjects(nChartObj)
oChart = oChartObj.Chart
oChart.ChartType = Excel.XlChartType.xlLine
oChart.SetSourceData(Source:=xlSheet.Range("M" &
nChartOffset + 13 & ":N" & ((nChartOffset) + 13) + i),
Plotby:=Excel.Constants.xlColumn)
'Dim xlsSerie As Excel.SeriesCollection =
oChart.SeriesCollection(1)

oChart.Location(Excel.XlChartLocation.xlLocationAs Object, "Quarterly
Portfolio Review")
oChartObj.Width = 250
oChartObj.Height = 175

Everything that I have tried has given me an error. I have looked
through the chartobject but do not see what I need. How can I do this?

Thanks,
enak


--
enak
------------------------------------------------------------------------
enak's Profile: http://www.excelforum.com/member.php...o&userid=28650
View this thread: http://www.excelforum.com/showthread...hreadid=483152

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stacked area and area chart combo [email protected] Charts and Charting in Excel 6 August 18th 06 02:30 PM
Resize plot area in a chart area Darlene Excel Discussion (Misc queries) 0 July 10th 06 02:50 PM
How to increase chart area without affecting plot area? [email protected] Charts and Charting in Excel 2 April 21st 06 09:05 PM
Resize chart area without resizing plot area Janwillem van Dijk Charts and Charting in Excel 2 August 2nd 05 01:52 AM
Resize chart area without resizing plot area Janwillem van Dijk[_2_] Excel Programming 2 August 2nd 05 01:52 AM


All times are GMT +1. The time now is 11:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"