View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Fred Russell Fred Russell is offline
external usenet poster
 
Posts: 12
Default 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.