Editing the appearance of scatter graph -VBA

flynch

New Member
Joined
Apr 3, 2017
Messages
17
I have a scatter graph which works fine with vba. And I managed to change the colour in the middle of the marker but the border is another colour and so the marker is now two colours. I have the following part of the code:

Sub MySummaryGraph(i As Long, cht As Chart)
With cht
With .SeriesCollection.NewSeries
.Name = ActiveSheet.Cells(i, "HO")
.Values = ActiveSheet.Cells(i, "HN")
.XValues = ActiveSheet.Cells(i, "HU")
.Format.Fill.ForeColor.RGB = RGB(255, 0, 0)

End With

I want to add the code so the border of the marker is also red. And also, I want to add a label which is based on the series name. As I can only seem to label it based on x axis values. If I could keep the same code but just start the next line with .format.border etc - that would be great

Thanks
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,223,964
Messages
6,175,659
Members
452,666
Latest member
AllexDee

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