After a lot of pointless reading (I never found a good overview on how to modify embedded charts), it occurred to me to record a macro of my modifying the graph that the spreadsheet produces into the spreadsheet that I wanted to have. I could then run the macro immediately after the graph is regenerated, with the result that the graph will maintain the appearance I want.
It still took many attempts to create a macro that properly modifies the graph, but I eventually did. I now call that macro as the first line of code following the code that updates the graph. The macro follows:
Sub MembershipGraphFormat()
'
' Formatting the Chapter Membership Graph
'
ActiveSheet.ChartObjects("Chart 8").Activate
ActiveChart.FullSeriesCollection(1).Select
With Selection.Format.Line
.Visible = msoTrue
.ForeColor.RGB = RGB(192, 0, 0)
.Transparency = 0
End With
ActiveChart.FullSeriesCollection(2).Select
With Selection.Format.Line
.Visible = msoTrue
.ForeColor.RGB = RGB(17, 251, 5)
.Transparency = 0
End With
ActiveChart.FullSeriesCollection(3).Select
With Selection.Format.Line
.Visible = msoTrue
.DashStyle = msoLineDash
End With
With Selection.Format.Line
.Visible = msoTrue
.Weight = 1.25
End With
ActiveChart.FullSeriesCollection(4).Select
With Selection.Format.Line
.Visible = msoTrue
.DashStyle = msoLineDash
End With
With Selection.Format.Line
.Visible = msoTrue
.Weight = 1.25
End With
ActiveChart.FullSeriesCollection(5).Select
With Selection.Format.Line
.Visible = msoTrue
.DashStyle = msoLineDash
End With
With Selection.Format.Line
.Visible = msoTrue
.Weight = 1.25
End With
ActiveChart.FullSeriesCollection(6).Select
With Selection.Format.Line
.Visible = msoTrue
.DashStyle = msoLineDash
End With
With Selection.Format.Line
.Visible = msoTrue
.Weight = 1.25
End With
End Sub
Bookmarks