Re: Excel - Update Chart Source Data

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Andy Pope (andy_at_andypope.info)
Date: 11/12/04


Date: Fri, 12 Nov 2004 14:58:18 +0000

Curse those line wraps!!

Its possible the source needs the full workbook reference,
(hopefully the wbk object is the correct workbook)

wbk.Worksheets("Summary_Chart").SetSourceData _
       Source:=wbk.Sheets("Summary").Range("A1:A24,F1:F24"), _
              PlotBy:=xlColumns

Cheers
Andy

Mike wrote:
> Andy,
>
> I'm sorry - when I put the (this is line 15) at the end of the line it
> wrapped to the next line. Here is line 15:
>
> Line 14: wbk.Worksheets("Summary_Chart").SetSourceData _
> Line:15: Source:=Sheets("Summary").Range("A1:A24,F1:F24"),
> PlotBy:=xlColumns
>
> When I run the code I get the error:
>
> Error Source : Microsoft Data Transformation Services (DTS)
> Error Description : Error Code: 0
> Error Source= Microsoft VBScript compiliation error
> Error Description: Expected statement
>
> Error on Line 15
>
> Thanks,
>
> Mike
>
>

-- 
Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

Quantcast