Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveChart.Location help Dave Excel Discussion (Misc queries) 1 November 16th 07 07:38 PM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM
How do I get rid of "Compile error in hidden module" error message David Excel Discussion (Misc queries) 4 January 21st 05 11:39 PM
ActiveChart.ADD Fails Sean McPoland[_6_] Excel Programming 3 September 24th 04 04:19 AM
Argument List Of ActiveChart.Location And ActiveChart.ChartType Mo[_3_] Excel Programming 2 September 1st 03 11:12 PM


All times are GMT +1. The time now is 08:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"