View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
K Dales[_2_] K Dales[_2_] is offline
external usenet poster
 
Posts: 1,163
Default Error message on Activechart.XYGroups

Try this: ActiveChart.XYGroups(1).SeriesCollection(1).XValue s =
"='MASTER'!$B$1:$E$1" (note the single quotes around the sheet name)


"SHIPP" wrote:

It still doesn't work. The following is what I used...

ActiveChart.XYGroups(1).SeriesCollection(1).XValue s = "=MASTER!$B$1:$E$1"

Help.

"K Dales" wrote:

First, ActiveChart.XYGroups returns a collection of all the XYGroups in the
chart; you need to specify the index to get a specific group - if there is
only one group it would be ActiveChart.XYGroups(1). But even then you aren't
ready to set the range because the ChartGroup itself is an object - the
actual points are in the SeriesCollection. The whole thing would be:

ActiveChart.XYGroups(1).SeriesCollection(1).Values (for the Y Values)
ActiveChart.XYGroups(1).SeriesCollection(1).XValue s (for the X Values)

"SHIPP" wrote:

This statement won't execute....

ActiveChart.XYGroups = "=" & strDataSheet & "!R" & _
Trim(Str(intBegRow)) & "C" & Trim(Str(intBegColumn)) & ":R" & _
Trim(Str(intEndRow)) & "C" & Trim(Str(intEndColumn))

Error Message: Method XYGroups of Objectchart failed. Error 1004.

Any ideas?
--
M. Shipp