我有一个XY散点图,上面有七个数据系列(使用Office 365)。我正在尝试使用VBA设置数据系列的格式,除了第一个系列与第七个系列莫名其妙地联系在一起之外,其他一切都工作正常。代码看起来像这样:
'Series 0
With Sheet1.ChartObjects("MyChart").Chart.FullSeriesCollection("Type_0")
With .Format.Fill
.Visible = msoTrue
.ForeColor.ObjectThemeColor = msoThemeColorAccent1
End With
.Format.Glow.Radius = 0
.Format.Line.Visible = msoFalse
.MarkerStyle = 1
End With
'Series 1 to 6
For i = 1 To 6
With Sheet1.ChartObjects("MyChart").Chart.FullSeriesCollection("Type" & i)
.MarkerStyle = -4105 'On
.Format.Line.Visible = msoFalse
With .Format.Glow
.Radius = 0
.Color.ObjectThemeColor = msoThemeColorAccent6
.Color.TintAndShade = 0
.Color.Brightness = 0
.Transparency = 0
.Radius = 5
.Color.RGB = RGB(105, 211, 33)
End With
With .Format.Fill
.Visible = msoTrue
.ForeColor.ObjectThemeColor = msoThemeColorText1
End With
End With
Next i
按顺序放置这些块并不重要,即使我尝试在“格式形状”窗口中手动调整系列格式,也无论何时尝试更改Series7,完全相同的更改都适用于Series0,反之亦然
我启用了哪种可怕的设置来使这种情况发生,以及如何将其关闭?