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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: Add a Chart for the selected data...

Status
Not open for further replies.

fotinaki

Programmer
Jun 4, 2003
12
FR
Hello,

I'm trying to create an Excel chart ...
I'm based on the
"Create an Automation Client for Microsoft Excel"

When I write the following code:
oSeries.XValues = oSheet.Range("A7", "A22")
nothing changes to the generated chart (same result when I leave out this line of code!) and I don't take the values of this column (A) to the axis X... Where is the error?

I have 2 series so I tried the following:
.SeriesCollection(1).XValues = oSheet.Range("A7", "A22")
.SeriesCollection(2).XValues = oSheet.Range("A7", "A22")

but I take this error:

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in microsoft.visualbasic.dll

Additional information: Type mismatch.

Please, can anybody help me?

Note: I found that this error is a bug of MS but I didn't understand what I'm supossed to do to correct it...

Thank you



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top