I'm working on a macro that will format a chart so that it will look the same as all of my other charts.
Getting the code set up for my XY Scatter charts has been causing problems. I've been recording keystrokes and then building the code from there. The issue I'm working on right now is this sliver of code
This should be turning my scatter points black, but instead it they turn that Excel 2010 blue color which seems to maybe be a default? I've tried numerous variations...
A simpler version without the With statement
Still got the same result. Also tried this line instead of the .ForeColor.RGB line
....which also turns the points to the blue and also tried
...which bugs. There has to be a simple answer here. Anyone have any ideas? I've been struggling so much with this that I set it up as its own sub and I'm running only this sub on the chart, so it can't be a problem in the rest of the macro. I've written more complicated code than this, so it is especially aggravating that it seems like such a simple task.
Thanks!
Getting the code set up for my XY Scatter charts has been causing problems. I've been recording keystrokes and then building the code from there. The issue I'm working on right now is this sliver of code
Code:
Sub FillScatterPoints()
ActiveChart.SeriesCollection(1).Select
With Selection.Format.Fill.Visible = msoTrue
.ForeColor.RGB = RGB(0, 0, 0)
.Transparency = 0
.Solid
End With
End Sub
This should be turning my scatter points black, but instead it they turn that Excel 2010 blue color which seems to maybe be a default? I've tried numerous variations...
A simpler version without the With statement
Code:
ActiveChart.SeriesCollection(1).Format.Fill.ForeColor.RGB = RGB(0, 0, 0)
ActiveChart.SeriesCollection(1).Format.Fill..Solid
Code:
.ForeColor.ObjectThemeColor = msoThemeColorText1
Code:
.BackgroundColor.RGB = RGB(0, 0, 0)
Thanks!