Sub
Farben_Diagramm()
Dim
chtDiagramm
As
Chart
Dim
i
As
Integer
, j
As
Integer
, intColor
As
Integer
, intSeries
As
Integer
, Color
As
Integer
Dim
strName
As
String
, strChart
As
String
, strBlatt
As
String
Dim
rng
As
Range
Dim
colorValue
As
Variant
strBlatt =
"Uebersicht"
strChart =
"UebersichtDia"
Set
chtDiagramm = Sheets(strBlatt).ChartObjects(strChart).Chart
intSeries = chtDiagramm.SeriesCollection.Count
For
i = 1
To
intSeries
strName = chtDiagramm.SeriesCollection(i).Name
For
j = 2
To
Range(
"RangePhase"
).Value + 1
If
Sheets(
"Pers_Input"
).Cells(j, 1).Value = strName
Then
With
chtDiagramm.SeriesCollection(strName)
.Format.Fill.Visible = msoTrue
colorValue = Sheets(
"Pers_Input"
).Cells(j, 4).DisplayFormat.Interior.Color
.Format.Fill.ForeColor.RGB = RGB((colorValue
Mod
256), ((colorValue \ 256)
Mod
256), (colorValue \ 65536))
End
With
End
If
Next
j
Next
i
End
Sub