View Single Post
  #2 (permalink)  
Old June 17th, 2007, 06:48 AM
zaerymoghaddam zaerymoghaddam is offline
Authorized User
 
Join Date: Jun 2007
Location: Tehran, Tehran, Iran.
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

At first I should mention that you have a syntax error in your code (data_series.caption = 'Monkey'.)
What is that period after 'Monkey' string ? But after removing this little syntax error, your code still have some problems. You used 21 as a chart type number (meaning ScatterMarkers chart). The main problem raises when you try to call data_series.SetData(4, 0, "A1:A12"); or data_series.SetData(3, 0, "B1:B12");.

You are using number 3 and 4 as a first parameter of these methods and these are wrong number for charts like this. If you use 2 and 1 (instead of 3 and 4) correspondingly, you will have your little pretty chart without any problem.

Good luck
Reply With Quote