Removing the line surrounding a chart

  • I am trying to create charts through VBA, and want the (default) line around it removed. If you know the shape name, that would be something like

    ActiveSheet.Shapes("Chart 304").Line.Visible = msoFalse

    I believe that line is not in the chart, but in the parent shape of it. So I tried to add it to the shape-related actions I am doing as well

    With ActiveChart.Parent
             .Height = 325 ' resize
             .Width = 500 ' resize
             .Top = 100 + 335 * (j - 25) ' reposition
             .Left = 4000   ' reposition
             .Line.Visible = msoFalse 'this is the line that it is all about, and that gives the error
       End With

    , but that gives an error. Any thoughts on what I am doing wrong?

Participate now!

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