Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ActiveChart.Location help | Excel Discussion (Misc queries) | |||
changing the message in an error message | Excel Worksheet Functions | |||
How do I get rid of "Compile error in hidden module" error message | Excel Discussion (Misc queries) | |||
ActiveChart.ADD Fails | Excel Programming | |||
Argument List Of ActiveChart.Location And ActiveChart.ChartType | Excel Programming |