![]() |
Error message on Activechart.XYGroups
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 |
Error message on Activechart.XYGroups
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 |
Error message on Activechart.XYGroups
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 |
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 |
All times are GMT +1. The time now is 05:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com