1

在 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

被记录,但如果同样运行它会导致系列线消失。

有人可以帮助我关闭边框的代码。

4

1 回答 1

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

在此处输入图像描述

在此处输入图像描述

于 2012-12-26T08:11:27.550 回答