Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveChart.SeriesCollection(1).Points(3).Select ERROR
Hi.
I need to apply the same color to the bars in a graph (via VBA), wether the graph has 3 bars or 7 bars. The problem that i face is that when the point (bar) doens´t exists excel gives back an error: ActiveChart.SeriesCollection(1).Points(3).Select in case of poínt 3 dont exists. Is there a way to teste if the point exists, to only apply the programing in that case? Thanks a lot!!! Jorge |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveChart.SeriesCollection(1).Points(3).Select ERROR
Would something like:
ActiveChart.SeriesCollection(1).Points.Interior.Co lorIndex = 3 Not work? "SpeeD72" wrote: Hi. I need to apply the same color to the bars in a graph (via VBA), wether the graph has 3 bars or 7 bars. The problem that i face is that when the point (bar) doens´t exists excel gives back an error: ActiveChart.SeriesCollection(1).Points(3).Select in case of poÃ*nt 3 dont exists. Is there a way to teste if the point exists, to only apply the programing in that case? Thanks a lot!!! Jorge |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveChart.SeriesCollection(1).Points(3).Select ERROR
Hi.
every bar has is how color. I can make every one with the same color. Is there a way to teste if the point exists, to only apply the programing in that case? Thnks Jorge |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveChart.SeriesCollection(1).Points(3).Select ERROR
Hi,
You can use the Count property to tell you how many points a series has. ActiveChart.SeriesCollection(1).Points.Count Cheers Andy SpeeD72 wrote: Hi. every bar has is how color. I can make every one with the same color. Is there a way to teste if the point exists, to only apply the programing in that case? Thnks Jorge |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveChart.SeriesCollection(1).Points(3).Select ERROR
The code will run more smoothly if instead of using
ActiveChart.SeriesCollection(1).Points(3).Select Selection.Interior.Blah you use ActiveChart.SeriesCollection(1).Points(3).Interior .Blah - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Andy Pope" wrote in message ... Hi, You can use the Count property to tell you how many points a series has. ActiveChart.SeriesCollection(1).Points.Count Cheers Andy SpeeD72 wrote: Hi. every bar has is how color. I can make every one with the same color. Is there a way to teste if the point exists, to only apply the programing in that case? Thnks Jorge |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Obtaining the value of an ActiveChart.SeriesCollection(1).Points(2) | Excel Programming | |||
Runtime Error '1004' Method 'ActiveChart' of Object '_Global' failed | Excel Programming | |||
Error message on Activechart.XYGroups | Excel Programming | |||
VBA- SeriesCollection(1).Value error | Excel Programming | |||
Argument List Of ActiveChart.Location And ActiveChart.ChartType | Excel Programming |