+ Reply to Thread
Results 1 to 3 of 3

Runtime Error 1004 when Setting Setting Series Values

  1. #1
    Registered User
    Join Date
    03-30-2010
    Location
    Galway
    MS-Off Ver
    Excel 2000
    Posts
    20

    Runtime Error 1004 when Setting Setting Series Values

    Hello,

    I'm having a problem with setting the values of a series collection on a chart. I have several hundred charts to plot with this same routine. It plots the first two fine but once it gets to the third chart, I get a Runtime Error 1004 "Unable to set the values property of the series class" error message when I specify the range containing the "values". The macro seems to have no problems setting the XValues.

    One possible explanation I can think of is that the ranges containing the data to be plotted on the third and subsequent charts contain empty cells whereas the data ranges for the first two charts do not. I know Excel is more than capable of plotting charts from ranges containing empty cells when you're plotting charts manually but could this be the cause of my problem? If so, why are there no issues setting the XValues even though the range for the XValue inputs contains the same number of empty cells at the same locations as range containing the Values input? When I put an On Error Resume Next command in front of the section of code for plotting the charts, all charts are created with the correct XValues ranges.
    Last edited by tonymctigue; 04-09-2010 at 10:05 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Runtime Error 1004 when Setting Setting Series Values

    Try creating the chart as Column chart. Once the series has had the range references set change the chart to desired type.

    Some chart types complain when constructed via VBA and data is missing
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    03-30-2010
    Location
    Galway
    MS-Off Ver
    Excel 2000
    Posts
    20

    Re: Runtime Error 1004 when Setting Setting Series Values

    Quote Originally Posted by Andy Pope View Post
    Try creating the chart as Column chart. Once the series has had the range references set change the chart to desired type.

    Some chart types complain when constructed via VBA and data is missing
    Hole in one. Got it working. Thanks for the help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1