LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.charting
SiriS
 
Posts: n/a
Default Trying to change ColorIndex for series settings


Hi,

I have a graph containing a variable amount of series with
Border.ColorIndex=xlAutomatic.

I would like
the colorindex of the 4th series to be the same as the first series,
the colorindex of the 5th series to be the same as the second series,
the colorindex of the 6th series to be the same as the third series,
the colorindex of the 7th series to be the same as the first series,
the colorindex of the 8th series to be the same as the second series,
and so on.

The periodicity of the colorindex varies, I mean, it varies how many
colors that shall be used.

How to do this in VBA code?

I have tried this


Code:
--------------------
For i = 1 To numOfSeries
For j = 1 To numOfDifferentColors
If i numOfDifferentColors Then
ActiveChart.SeriesCollection(numOfDifferentColors * (i - 1) + j).Select
With Selection.Border
.ColorIndex = ActiveChart.SeriesCollection(j).Border.ColorIndex
End With
With Selection
.MarkerBackgroundColorIndex = ActiveChart.SeriesCollection(j).MarkerBackgroundCo lorIndex
.MarkerForegroundColorIndex = ActiveChart.SeriesCollection(j).MarkerForegroundCo lorIndex
.MarkerStyle = ActiveChart.SeriesCollection(j).MarkerStyle
End With
End If
Next
Next
--------------------


but since the colorIndex is xlAutomatic for the first series, all
series only gets the xlAutomatic colorindex setting...

Any ideas??

Regards,
Siri


--
SiriS
------------------------------------------------------------------------
SiriS's Profile: http://www.excelforum.com/member.php...fo&userid=7995
View this thread: http://www.excelforum.com/showthread...hreadid=521686

 
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
How can I change the settings on the row headers/ Kevin Vaughn Excel Worksheet Functions 0 February 7th 06 04:54 PM
How do I change default number settings? Siberian Excel Worksheet Functions 1 November 27th 05 02:31 AM
Can you change the settings for an Import Wizard mstack Setting up and Configuration of Excel 1 November 16th 05 11:32 PM
How do I change the default settings in charts? drahcir Charts and Charting in Excel 1 December 14th 04 11:30 PM


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

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

About Us

"It's about Microsoft Excel"