批量修改折线图线条粗细颜色会变化,Office不会 。何解?

使用WPS的宏指令调整线条粗细后,颜色会变成一样的!!! 参考:《Excel经验之如何快速修改折线图线的粗细》 《EXCEL里折线图/散点图 里的线型怎么批量修改?》
江西省
浏览 8588
收藏
6
分享
6 +1
3
+1
全部评论 3
 
寻梦
打卡
· 安徽省
回复
 
码飞WPS
Debug测试就是变粗细那里会把颜色统一变成蓝色,一个很呆的方法设置粗线前加一个变量记录初始颜色,设置完后直接用这个颜色变量。 Sub changeLine() Dim MySeries As Series Dim originColor As Variant Dim i As Integer On Error GoTo ErrorHandler For Each MySeries In ActiveChart.SeriesCollection color = MySeries.Format.Line.ForeColor.RGB MySeries.Format.Line.Weight = 1 MySeries.Format.Line.ForeColor.RGB = color Next Exit Sub ErrorHandler: MsgBox "Please, select the chart before running this." End Sub
· 江西省
回复
 
码飞WPS
Sub changeLine() Dim MySeries As Series On Error GoTo ErrorHandler For Each MySeries In ActiveChart.SeriesCollection MySeries.Format.Line.Weight = 1 Next Exit Sub ErrorHandler: MsgBox "Please, select the chart before running this." End Sub
· 江西省
回复