Editing the appearance of scatter graph -VBA


New Member
Apr 3, 2017
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


Forum statistics

Latest member

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...