Sub GraphEdit()
Dim cht As String
cht = ActiveChart.Parent.Name
With ActiveSheet.ChartObjects(cht).Chart
.ChartType = xlXYScatterLines
.HasTitle = False
.ChartArea.Format.Line.Visible = msoFalse
.Axes(xlValue).HasTitle = True
.Axes(xlCategory).HasTitle = True
For i = 1 To .SeriesCollection.Count
With ActiveSheet.ChartObjects(cht).Chart _
.SeriesCollection(i)
.MarkerSize = 5
If i = 1 Then
.MarkerForegroundColor = RGB(0, 51, 204)
.MarkerStyle = xlMarkerStyleCircle
ElseIf i = 2 Then
.MarkerForegroundColor = RGB(153, 0, 204)
.MarkerStyle = xlMarkerStyleTriangle
ElseIf i = 3 Then
.MarkerForegroundColor = RGB(204, 0, 51)
.MarkerStyle = xlMarkerStyleSquare
ElseIf i = 4 Then
.MarkerForegroundColor = RGB(204, 153, 0)
.MarkerStyle = xlMarkerStyleDiamond
ElseIf i = 5 Then
.MarkerForegroundColor = RGB(51, 204, 0)
.MarkerStyle = xlMarkerStyleSquare
ElseIf i = 6 Then
.MarkerForegroundColor = RGB(0, 204, 153)
.MarkerStyle = xlMarkerStyleDiamond
Else
.MarkerForegroundColor = RGB(10, 10, 10)
.MarkerStyle = xlMarkerStyleCircle
End If
.MarkerBackgroundColor = RGB(245, 245, 245)
With .Format.Line
.Weight = 0.5
.DashStyle = msoLineSolid
If i = 1 Then
.ForeColor.RGB = RGB(0, 51, 204)
ElseIf i = 2 Then
.ForeColor.RGB = RGB(153, 0, 204)
ElseIf i = 3 Then
.ForeColor.RGB = RGB(204, 0, 51)
ElseIf i = 4 Then
.ForeColor.RGB = RGB(204, 153, 0)
ElseIf i = 5 Then
.ForeColor.RGB = RGB(51, 204, 0)
ElseIf i = 6 Then
.ForeColor.RGB = RGB(0, 204, 153)
Else
.ForeColor.RGB = RGB(10, 10, 10)
End If
.Transparency = 0
End With
End With
Next
.HasLegend = True
.Legend.IncludeInLayout = False
.Legend.Left = .ChartArea.Width / 10
.Legend.Top = .ChartArea.Height / 10
.Legend.Font.Name = "游ゴシック"
.Legend.Font.Size = 10
.Legend.Format.Line.ForeColor.RGB = RGB(30, 30, 30)
With .Legend.Format.Fill
.Visible = msoTrue
.ForeColor.RGB = RGB(255, 255, 255)
End With
End With
With ActiveSheet.ChartObjects(cht)
.Width = 360
.Height = 270
End With
End Sub