Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Charts

Status
Not open for further replies.

enak

Programmer
Jul 2, 2002
412
US
Has anyone been successful with working with Excel charts?

I create a chart and place it in the existing spreadsheet as an object. I select a cell where I want the top left corner to be and when the chart is created it is in the general area but not in the exact spot. I need to be able to place the chart at an exact location in the spreadsheet.

Also, I need to be able to size the chart as well as some other things.

Here is the code that I am using:

oChart.ChartArea.Height = 150
oChart.ChartArea.Width = 300
oChart.HasTitle = True
oChart.ChartTitle.Text = "ASSET GROWTH SINCE INCEPTION"
oChart.ChartTitle.Font.FontStyle = "Bold"
oChart.ChartTitle.Font.Size = 9.75
oChart.SeriesCollection = xlSheet.Range("M" & (nrow * 26) + 13 & ":M" & ((nrow * 26) + 13) + i))
xlsSerie.Item(1).Name = "Market Value"
xlsSerie.Item(2).Name = "Net Cash Flow"

I get an error on the first line above that states:

"Exception from HRESULT: 0x800401A8."

I don't know what this error means. I can not find anything that helps on the internet.

Can someone PLEASE HELP!!!!!!!

Thanks,
enak
 
Doesn't anyone know what is happening here? I really need some help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top