Problem with Scatter Lines and Borders

  • Hi everyone,

    I was writing a macro to create a combo chart. However, I ran into a problem, the legends shows the line on the scatter plot, which I do not want. I tried turning it off by using
    Format.Line.Visible = msoFalse, however it turns off my border as well. I tried looking for articles online regarding this issue but nothing helped. To summarize, I want the border but not the line, however Format.Line.Visible = msoFalse turns both line and border off. Is there a way or a code that separates the two formatting?

    Here is a copy of my code:

    For i = ScatterPart To NumOfSeries

    ActiveChart.FullSeriesCollection(i).ChartType = xlXYScatter


    With Selection

    .Format.Line.Visible = msoFalse

    .Format.Line.ForeColor.RGB = RGB(0, 0, 0)

    .Format.Line.Transparency = 1

    .Format.Line.Weight = 2

    .MarkerStyle = -4115

    .MarkerSize = 10

    .Border.LineStyle = xlNone

    .Border.Weight = 2

    .Format.Fill.Visible = msoTrue

    .Format.Fill.ForeColor.RGB = RGB(0, 0, 0)

    .Format.Fill.Transparency = 0


    End With

    Next i

    I want to make it


    To This

    Without turning of the border of the marker.

    Thank you in advance

  • Hi,

    It would make it simpler to help you, if you could attach a sample workbook, please. :)

    Theory is when you know something, but it doesn’t work. Practice is when something works, but you don’t know why. Programmers combine theory and practice: nothing works and they don’t know why

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!