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
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