I want to plot data on an Excel chart using VBA. In Quickbasic there is a "Line" statement that can be used, e.g., Line (10,10)-(20,20). Is there anything similar to this in VBA?
Do you want to manipulate a Chart (i.e. a graph plotting data from the worksheet), or draw Shapes?
First option you use the ChartObjects collection of the worksheet, second option you use the Shapes collection.
Cheers,
Joerd
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
If I use ChartObjects with AddLine it says "object does not support this property or method". I am trying to draw lines on a chart using coordinates generated in the Basic program and not in cells.