Sub Macro6()
Dim X
X = ActiveSheet.Name
Charts.Add
ActiveChart.ChartType = xlXYScatterLines
ActiveChart.SeriesCollection(1).XValues = Sheets("Sheet1").Range("A2:A8")
ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("D1:D8")
ActiveChart.Location Where:=xlLocationAsNewSheet, Name:="Mike Jones At Bats"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "Mike Jones At Bats"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Year"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "At Bats"
End With
With ActiveChart
.HasAxis(xlCategory, xlPrimary) = True
.HasAxis(xlValue, xlPrimary) = True
End With
ActiveChart.Axes(xlCategory, xlPrimary).CategoryType = xlAutomatic
ActiveChart.HasLegend = False
End Sub