VB: setting marker's border line?

  • Hi guys,
    I've got the following piece of code:

    Code
    If iSeriesNumber = 4 Then
    .Format.Line.Visible = False
    .MarkerStyle = xlMarkerStyleTriangle
    .MarkerSize = 8
    .MarkerForegroundColor = RGB(255, 255, 255)
    End If


    How do I set marker's border line width to 0.25 pt while still hiding the series line? At the moment border line comes up as 1pt (default?).

    Many thanks

  • Re: VB: setting marker's border line?


    Try setting the marker border to what you want directly on the chart while recording a macro. If you are able to get the setting you want then extract the relevant bit of code from the recorded macro and include it in your code.


    If you are not able to get the setting/format you require by changing the chart directly then VBA will not be able to do so either.

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • I just posted somethig related here

    In your case you could try the next code:

    Code
    If iSeriesNumber = 4 Then
        .Format.Line.Weight = 0.25 'Sets thickness = 0.25 to both markers-line and series-line
        .Border.LineStyle = xlNone 'Hide the series-line
        .MarkerStyle = xlMarkerStyleTriangle
        .MarkerSize = 8
        .MarkerForegroundColor = RGB(255, 255, 255) 'Sets white color to markers-line
    End If

Participate now!

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