+ Reply to Thread
Results 1 to 4 of 4

Why an I getting error Method 'axes of object' _ chart Failed

  1. #1
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    638

    Why an I getting error Method 'axes of object' _ chart Failed

    I have a chart that ran fine but it was not grabbing enough range off worksheet depending on what data set I used. So I tried to modify the range to include all the rows and If I use my old range for my data series which is
    Please Login or Register  to view this content.
    The chart comes through fine.

    When I use
    Please Login or Register  to view this content.
    I get error "Method 'axes of object' _ chart Failed"

    I am creating a scatter Chart and I am making several ones to run within my macro IS there a template I could use and just modify the ranges to suit each set of data?
    Also I notice every data set might have a different range for the Axis and I would like to be able and have the axis get its data from within the data it is pulling with out having to modify by hand.

    Here is the total code: I created by recording macro and piecing together.
    Please Login or Register  to view this content.

  2. #2
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,071

    Re: Why an I getting error Method 'axes of object' _ chart Failed

    Hi bdouglas1011,

    As far as the first part of your question;

    Please Login or Register  to view this content.
    Your error is about '1LR' not being the same as $B$4400"

    I'd fix that first.
    Remember you are unique, like everyone else

  3. #3
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    638

    Re: Why an I getting error Method 'axes of object' _ chart Failed

    Got it working but it does not seem to capture the range down the entire row.

    How could I change it to work.
    [code]
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.FullSeriesCollection(1).Name = "=BOTTOM!$Y$1"
    ActiveChart.FullSeriesCollection(1).XValues = "=BOTTOM!$B$2:$B$4400"
    ActiveChart.FullSeriesCollection(1).Values = "=BOTTOM!$Y$2:$Y$4400"
    [code]

    I need to capture all rows in column b and Y

    My data is never constant here is use 4400 rows sometimes it is over 10000.

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Why an I getting error Method 'axes of object' _ chart Failed

    Perhaps you just need to specify the sheet when finding the last row (always a good idea anyway):
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Error: Method 'Value' of Object 'Range' Failed
    By jsotor4 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-21-2014, 08:58 AM
  2. Open method of object failed error
    By maw230 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2011, 09:19 AM
  3. Object error - method failed
    By okriskao in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2009, 02:02 AM
  4. Activate method of chart object failed
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2008, 06:37 AM
  5. [SOLVED] Run-time error 1004: Method 'Axes' of object '_chart' failed
    By Brian Morrison in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-20-2005, 11:05 AM

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