雷达图点的边界属性

时间:2012-12-26 06:41:05

标签: excel vba excel-vba

在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
记录

,但如果运行相同,则会导致系列线消失。

有人可以用代码来帮我关闭边框。

1 个答案:

答案 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

enter image description here

<强> AFTER

enter image description here