below macro applies a built-in chart style (ChartStyle = 27) to all charts of the active sheet.
I got another two separate macros to apply built-in chart styles (ChartStyle = 25, ChartStyle = 28) to all the charts.
I wonder whether it is possible to use just one single toggle button to switch between the three built-in chart styles, i.e. say ...
built-in style '25' is applied to all the charts, pressing the toggle buttion applies built-in ChartStyle 28, pressing this toggle buttion again applies ChartStyle 27. Another activation of the toggle button applies ChartStyle 25 again and so forth.
Help is much appreciated. Thank you very much in advance.
Dim Chtobj As ChartObject
Dim i As Integer
Dim k As Integer
Dim j As Integer
Dim l As Integer
If MsgBox("Would you like to add blue colouring to all charts?", vbQuestion + vbYesNo, "Apply Blue STyle") = vbNo Then
If ActiveSheet.ChartObjects.Count = 0 Then
MsgBox "No Charts existing", vbInformation, "There are noch charts on the active sheet!"
For Each Chtobj In ActiveSheet.ChartObjects
.ChartStyle = 27
i = i + 1