+ Reply to Thread
Results 1 to 4 of 4

#REF! Error in Chart

  1. #1
    Registered User
    Join Date
    08-14-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    7

    #REF! Error in Chart

    Hi All

    I am trying to activate a chart in a workbook which has a #REF! error in the series. I deliberately created the #REF! Error in the chart so that I can write a macro which finds charts with #REF errors in it.

    I have managed to identify all charts in a workbook with #REF! errors in the series but excel returns an application defined error when I try to do Activesheet.Chartobjects("Chart name").Activate

    Is there a work around for this?


    Cheers

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

    Re: #REF! Error in Chart

    Do you have to activate the chart?

    How do you identify charts with #REF?
    What do you want to do when you find such as chart?
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    08-14-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: #REF! Error in Chart

    Hi Andy

    I don't need to activate the chart, but I need to be able to get its properties. I can't access the object's properties because the object is a chart that contains a #REF! Error.

    I identify the charts with the error by using a For Each Loop to go through all chartobjects in a workbook and read the Series property. I use Instr to determine if there is a #REF! in the series.

    For some reason the For Each Loop is able to identify and read the properties of the charts with errors, but a direct call on the chart's property returns an application defined error.

    I want to get the error chart's properties to determine the location of the chart without using a for each loop if possible.


    Thanks

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

    Re: #REF! Error in Chart

    You can use error trapping to control the error raised when checking the series formula.

+ 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