设置数据透视表中所有系列的线宽

时间:2009-06-17 13:03:02

标签: excel charts pivot-table excel-2000

我试过环顾所有图表选项,但我似乎无法找到一种方法来一劳永逸地设置图表系列的线宽。当然,每次更改数据透视表中的系列选择时,我都可以运行一个宏,但我希望有一个更简单的方法......

1 个答案:

答案 0 :(得分:0)

这是当前(缓慢,黑客)解决方案 - “CustomChart”类模块:

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

并且此代码段位于任何模块的顶部:

Dim myChart As New customChart

Sub Auto_Open()
    Set myChart.customChart = Charts(1)
End Sub