View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.charting
ragtopcaddy via OfficeKB.com ragtopcaddy via OfficeKB.com is offline
external usenet poster
 
Posts: 22
Default Chart Object source data problem

Sorry for the confusion!

The changes required to successfully connect the additional 2 charts to their
data sources are noted below:

'i = 9
i = 11
x = conRows ' 33
On Error GoTo OuttaHere
Do
'Link the charts to their source data:
For y = 0 To 7
' For y = 0 To 9
shtRpt.ChartObjects(i + y).Activate
XLobj.ActiveChart.SetSourceData _
Source:=XLobj.Sheets("StoreReports").Range(shtRpt. Cells(x + (2 *
y), conCols - 5), _
shtRpt.Cells(x + 1 + (2 * y), conCols)), PlotBy:=xlRows
Next y
' i = i + 8
i = i + 10
x = x + conRows
Loop

It was not just the "For y = 0 To 7" line that had to be increased by 2, but
"i = 9" and "i = i + 8" as well.

--
Bill Reed

"If you can't laugh at yourself, laugh at somebody else"

Message posted via http://www.officekb.com