This is a part of my code:
ActiveSheet.Shapes.Addchart.Select
ActiveChart.ChartType = xlXYScatter
ActiveChart.Location Where:=xlLocationAsNewSheet
ActiveChart.ChartArea.Clear
This works just fine, however, when I use a chart with over 32,000 lines, this results in error. Can I somehow stop excel from trying to chart the data before it actually knows which data I want to use?