VB: setting marker's border line?

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

    1. If iSeriesNumber = 4 Then
    2. .Format.Line.Visible = False
    3. .MarkerStyle = xlMarkerStyleTriangle
    4. .MarkerSize = 8
    5. .MarkerForegroundColor = RGB(255, 255, 255)
    6. 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:

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

    Closed the thread.