Private
Sub
Workbook_Open()
Worksheets(
"Overview Dashboard"
).
Select
Dim
wks
As
Worksheet
For
Each
wks
In
ThisWorkbook.Worksheets
Select
Case
wks.Name
Case
<code class=
"vb string"
style=
"border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; min-height: auto !important; color: blue !important;"
>
"Blatt 1"
</code><code class=
"vb plain"
style=
"color: rgb(0, 0, 0); border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; min-height: auto !important;"
>, </code><code class=
"vb string"
style=
"border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; min-height: auto !important; color: blue !important;"
>
"Blatt 2"
</code>
Case
Else
wks.Protect userinterfaceonly:=
True
, Password:=
"XYZ"
wks.EnableOutlining =
True
End
Select
Next
Call
fixinvertcolor
End
Sub
Sub
fixinvertcolor()
Dim
N
As
Integer
Dim
chartname
As
String
For
N = 1
To
2
chartname =
"TargetAch "
& N
ActiveSheet.ChartObjects(chartname).Activate
ActiveChart.FullSeriesCollection(1).
Select
With
Selection.Format.Fill
Selection.InvertColor = RGB(192, 0, 0)
End
With
Next
N
End
Sub