Here is my code
Sub testcharttype()
Dim myChart As ChartObject
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
For Each myChart In ws.ChartObjects
If myChart.Chart.ChartType = xlLine Then
myChart.Chart.ChartType = xlXYScatterLines
Else
myChart.Chart.ChartType = xlLineMarkers
End If
Next myChart
Next ws
End Sub
.. It works to switch all my graphs from a scatter graph with lines connecting each data point to a line graph with markers. However, it will only switch once then the macro won't work anymore. This is puzzling because if I don't include the "Markers" part it will continuously switch between graphs. But I would like it to switch back and forth AND include markers on the line chart.
Bookmarks