Set line weight for all series in pivot chart
-
06-07-2019 - |
Question
I've tried looking around all the chart options, but I can't seem to find a way to set the line width of the chart series once and for all. Of course, I could run a macro every time the series selection in the pivot chart is changed, but I'm hoping there's a simpler way...
Solution
Here's the current (slow, hacky) solution - A "CustomChart" class module:
Option Explicit
Public WithEvents customChart As Chart
Private Sub customChart_Calculate()
Dim customSeries As series
Application.ScreenUpdating = False
For Each customSeries In customChart.SeriesCollection
customSeries.Border.Weight = xlThick
Next
Application.ScreenUpdating = True
End Sub
and this snippet at the top of any module:
Dim myChart As New customChart
Sub Auto_Open()
Set myChart.customChart = Charts(1)
End Sub
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow