Drawing Charts with VBA
Thanks Tom
FYI the problem with the ChartType was that even though the macro recorder
in excel records the order as:
Charts.Add
ActiveChart.ChartType = xlStockHLC
ActiveChart.SetSourceData Source:=Range("GraphTable"), PlotBy:=xlColumns
for certain chart types (Stock charting in particular) the data source has
to appear before the ChartType
i.e.
Charts.Add
ActiveChart.SetSourceData Source:=Range("GraphTable"), PlotBy:=xlColumns
ActiveChart.ChartType = xlStockVHLC
after making that correction it worked fine.
|