LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Graph problem with VBA script

Luc -

I prefer to use ActiveSheet.ChartObjects.Add rather than Charts.Add to
add a chart object ot the sheet. Using ChartObjects.Add, you get a new
chart object with no series in it. Sometimes with Charts.Add you get a
dummy series in the new chart. I show some of these code examples he

http://www.geocities.com/jonpeltier/...kChartVBA.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______

Luc Larochelle wrote:
Hi,

I was wondering why sometimes I get a "400" error with the
following code. The problem is mostly with the
line "Activechart.seriescollection.newseries". If I don't
use it sometimes I get an error message and the graphs
won't appear and sometimes I won't get any problem at all.
If I use it sometimes my graphs will appear normal with
only one serie on it, but sometimes I'll get 2 series and
2 different colors with unknown values ?! I would like to
have complete control over the automated graph process and
I don't want such anomalies to happen. Could anyone please
help me with this ?

Thanks a lot

Luc Larochelle


For x = 0 To UBound(types_graph)

Worksheets("calculs").Activate
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.Location _
Whe=xlLocationAsObject,Name:="Calculs"
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).Values = Worksheets _
("calculs").Range(Cells(3, x + 3), Cells(max_crew + 3, _
x + 3))
ActiveChart.SeriesCollection(1).XValues = Worksheets _
("calculs").Range(Cells(3, 2), Cells(max_crew + 3, 2))
With ActiveChart
.HasTitle = True
...
End With

Next x


 
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
Challenging Graph problem! Qwerty Charts and Charting in Excel 2 December 13th 05 03:54 PM
Graph Problem Saxman Excel Discussion (Misc queries) 0 November 19th 05 04:31 PM
Help with an excel graph problem Jckksk Charts and Charting in Excel 1 November 11th 05 07:58 PM
Excel Graph script the G Charts and Charting in Excel 1 October 11th 05 12:15 PM
OsCommerce - Easy Populate Script - CSV/TXT Conversion Problem. PriceTrim Excel Discussion (Misc queries) 3 July 5th 05 05:27 PM


All times are GMT +1. The time now is 05:47 AM.

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

About Us

"It's about Microsoft Excel"