The code below creates a chart. I would like to put this code in a loop and then 1) have code before it that checks to see if this "Results" charts exists, and 2) if it does exist - to delete it. Please help.
MyRange = Range("B4:B204")
Range(MyRange).Select
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("Info").Range(MyRange), _
PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsObject, Name:="Info"
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
ActiveChart.HasLegend = False
'- Names the Chart.
ActiveChart.Parent.Name = "Results"
Thanks
John
MyRange = Range("B4:B204")
Range(MyRange).Select
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("Info").Range(MyRange), _
PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsObject, Name:="Info"
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
ActiveChart.HasLegend = False
'- Names the Chart.
ActiveChart.Parent.Name = "Results"
Thanks
John