View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Don Rouse Don Rouse is offline
external usenet poster
 
Posts: 29
Default Chart source data range

I am trying to add charts where the source data range is variable. The
following code gives me a "91" error "Object variable not set. It does not
like the activecell reference for the range.

How can I get around this problem?

Sub AddChart()
Charts.Add
ActiveChart.ChartType = xl3DColumn
ActiveChart.SetSourceData
Source:=Sheets(myDivision).Range(ActiveCell.Offset (1, 0),
ActiveCell.End(xlDown).Offset(0, 2)), _
PlotBy:=xlColumns

Thank you for your assistanve.

Don