在Excel VBA中,我可以使用
访问RadarChart的每个点ActiveChart.FullSeriesCollection(1).Points(1).Select
我正在使用
应用图像With Selection
.MarkerStyle = -4147
.MarkerSize = 5
End With
With Selection.Format.Fill
.Visible = msoTrue
.UserPicture FilePath + "Red.PNG"
End With
问题是这个标记以边框结束 如果我录制宏来进行更改并查看代码
Selection.Format.Line.Visible = msoFalse
记录,但如果运行相同,则会导致系列线消失。
有人可以用代码来帮我关闭边框。
答案 0 :(得分:0)
您必须使用.MarkerForegroundColorIndex = xlColorIndexNone
参见此示例
Option Explicit
Sub Sample()
Dim sc As Series, dp As Point
Dim FilePath As String
FilePath = "C:\"
Set sc = ActiveSheet.ChartObjects(1).Chart.SeriesCollection(1)
With sc
.MarkerStyle = -4147
.MarkerSize = 5
For Each dp In sc.Points
dp.MarkerForegroundColorIndex = xlColorIndexNone
Next
With .Format.Fill
.Visible = msoTrue
.UserPicture FilePath + "Red.PNG"
End With
End With
End Sub
<强> BEFORE 强>
<强> AFTER 强>