(Solved) – How to change patterned colors for marker on data series

(solved)-–-how-to-change-patterned-colors-for-marker-on-data-series

I am trying to change the colors for my chart series MARKERS if they have a pattern.

I have no issues with creating the correct chart but I cannot change the pattern color, it seems to be always “blue”. I have tried the general series settings:

With SeriesCollection(mySeries)
    .MarkerStyle = 7
    .MarkerSize = 3
    .format.Fill.ForeColor.RGB = RGB(22, 22, 22)
    .format.Fill.BackColor.RGB = RGB(22, 22, 22)
    .format.Fill.Patterned msoPatternNarrowHorizontal
End with

This does not work. When I set the pattern style the markers are being formatted back to their “blue” color.

I have also tried looping through the points to change them one by one but it does not work either.

For Each pt In mychart.SeriesCollection(mySeries).Points
    pt.format.Fill.ForeColor.RGB = RGB(22, 22, 22)
    pt.format.Fill.BackColor.RGB = RGB(22, 22, 22)
    pt.format.Fill.Patterned msoPatternNarrowHorizontal
Next pt

As soon as I set the pattern it changes color. If I change the color AFTER setting pattern, the pattern disappears.
Any ideas how to set the correct for patterned markers?

Leave a Reply

Your email address will not be published. Required fields are marked *