+ Reply to Thread
Results 1 to 9 of 9

Unable to get the ChartObjects property of the Worksheet class?

  1. #1
    Registered User
    Join Date
    03-18-2010
    Location
    Dallas, USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Unable to get the ChartObjects property of the Worksheet class?

    Hey everyone,

    I'm having trouble with the following code. When I run the code in excel 2007 it runs just fine, but when I try it in 2003, I'm getting the following error.

    "Run-time error '1004' Unable to get the ChartObjects property of the Worksheet class"

    Here's the code:

    Please Login or Register  to view this content.
    Any ideas why this would be accepted in Excel 2007 and not excel 2003? And ideas on correcting it?

    Thanks in advance for any help!

    John
    Last edited by jrabenhorst; 03-18-2010 at 02:46 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Unable to get the ChartObjects property of the Worksheet class?

    Welcome to the forum.

    Please take a few minutes to read the forum rules, and then edit your post to add CODE tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    03-18-2010
    Location
    Dallas, USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Unable to get the ChartObjects property of the Worksheet class?

    I apologize... I've now added code tags. Any help would be greatly appreciated!

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

    Re: Unable to get the ChartObjects property of the Worksheet class?

    Are you sure the chart is called Chart 11?
    Remember what the dormouse said
    Feed your head

  5. #5
    Registered User
    Join Date
    03-18-2010
    Location
    Dallas, USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Unable to get the ChartObjects property of the Worksheet class?

    Yes, that was my first thought. I've checked it two different ways already. Is there any reason this code wouldn't work in Excel 2003?

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

    Re: Unable to get the ChartObjects property of the Worksheet class?

    Only if there is no chartobject on the activesheet with that name. Is it the same workbook in both versions of Excel? If so, can you post it?

  7. #7
    Registered User
    Join Date
    03-18-2010
    Location
    Dallas, USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Unable to get the ChartObjects property of the Worksheet class?

    Yes, the chart is in the same workbook. I've sanatized the rest of the document and focused on the problem in the file attached. Any help would be greatly appreciated. Thanks in advance
    Attached Files Attached Files

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

    Re: Unable to get the ChartObjects property of the Worksheet class?

    Oh, it's because you have grouped the shapes. You will have to ungroup them in 2003 or access the relevant groupitem:
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    03-18-2010
    Location
    Dallas, USA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Unable to get the ChartObjects property of the Worksheet class?

    That seems to be working now. 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)

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