【发布时间】:2020-09-16 01:43:40
【问题描述】:
使用这些代码,我想制作带有填充和不带填充标记的可转换 XY 散点图。 但是一旦标记转换为不填充并返回填充,标记不再转换为不填充。 如果我保存并关闭,那么它会再次起作用。 请您推荐我需要更新的点吗?
转换为不填充
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.FullSeriesCollection(1).Select
Selection.MarkerSize = 10
With Selection
.Format.Fill.Visible = False
.Format.Line.Visible = msoTrue
.Format.Line.Weight = 1
.Border.LineStyle = xlLineStyleNone 'Remove lines between points
End With
用填充转换成
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.FullSeriesCollection(1).Select
Selection.MarkerSize = 10
With Selection
.Format.Fill.Visible = msoTrue
.Format.Fill.Solid
.Format.Fill.ForeColor.RGB = RGB(100, 100, 0)
.Format.Line.Visible = msoTrue
.Format.Line.Weight = 5
.Border.LineStyle = xlLineStyleNone 'Remove lines between points
End With
谢谢。
【问题讨论】:
标签: excel vba scatter excel-charts