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
strBlatt =
"Analyse"
strChart =
"Personalkapazitaet"
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
.Format.Fill.ForeColor.RGB = RGB(Cells(j, 4).(ColorValue
Mod
256) &
", "
& Cells(j, 4).((ColorValue \ 256)
Mod
256) &
", "
& Cells(j, 4).(ColorValue \ 65536))
Sheets(
"Pers_Input"
).Cells(j, 12).Value, Sheets(
"Pers_Input"
).Cells(j, 13).Value)
End
With
End
If
Next
j
Next
i
End
Sub