Change marker line width for all series

Marco_Polo

New Member
Joined
May 17, 2017
Messages
1
I am trying to create a macro that will amend all the markers within my chart to be exactly the same style, shape, size etc. also removing connecting lines.

I have gotten most of the way to what I am trying to achieve with the code below:

PHP:
Sub fixchart()
Dim i As Long, j As Long
i = ActiveChart.SeriesCollection.Count
For j = 1 To i    
With ActiveChart.SeriesCollection(j)        
.MarkerStyle = 2        
.MarkerSize = 6        
.MarkerForegroundColor = RGB (0, 0, 0)        
.MarkerBackgroundColor = RGB(255, 255, 255)        
.Border.LineStyle = xlNone   
End With
Next j
End Sub

However, I cannot figure out a way to amend the marker line width. Every piece of code I have found so far just appears to change the connecting line width rather than marker line width. I am a VBA novice and so far have just pieced together other bits of code I have found through forums, so any assistance would be greatly appreciated.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Way late to answer, but this came up when I was doing a search, so ....
ActiveChart.FullSeriesCollection(3).Format.Line.Weight = 4 'Sets the width of the chart line
Now change some aspect of the marker
ActiveChart.FullSeriesCollection(3).Format.Fill.ForeColor.RGB = RGB(255, 0, 0)
Same command as before now sets the width of the marker line (border)
ActiveChart.FullSeriesCollection(3).Format.Line.Weight = 4 'Sets the width of the marker line
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top