+ Reply to Thread
Results 1 to 3 of 3

Setting a data range for a chart (error 1004).

  1. #1
    Forum Contributor
    Join Date
    08-14-2008
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    103

    Setting a data range for a chart (error 1004).

    Hi
    I'm trying to do a simple loop which creates charts based on an ID number. I recorded a macro and has tried to modify it but am having trouble defining the correct reange when settign the data source.

    Here is my code:

    Please Login or Register  to view this content.
    This results at a run time error 1004.
    Any help debugging this would be appreciated.
    Last edited by HammerTime; 02-02-2010 at 12:05 AM.

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: Setting a data range for a chart (error 1004).

    Hi HammerTime,

    I don't think you can use the cells method when setting the source area for a chart. See how this goes:

    Please Login or Register  to view this content.
    HTH

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

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

    Re: Setting a data range for a chart (error 1004).

    You need to fully qualify the references.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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