I have VBA script that generates charts and works on everyones computer except for one person in our group. The code would crash at the ".add" in the snippet below with the error that I was using wrong parameters for the charttype.
Turns out the way we fixed it was to make her default chart type in her excel settings to be "XYscatter". Although it is working I would like to avoid having to do manual changes to users computers. Why didnt' my code generate the correct type of plot explicity instead of choking on the parameters as iff I was attempting to create a bar chart?
Thanks for any insights :-)
With ActiveSheet.ChartObjects.Add _
(Left:=chartLeft, Width:=chartWidth, Top:=chartTop, Height:=chartHeight)
.Chart.SetSourceData Source:=ActiveSheet.Range("a1", "a1")
.Chart.ChartType = xlXYScatterLines
.Chart.Parent.Name = newsheetnameis
End With
Bookmarks