+ Reply to Thread
Results 1 to 5 of 5

Error 438 - object doesn't support this property or method by chart.setsourcedata

  1. #1
    Registered User
    Join Date
    05-26-2017
    Location
    Budapest, Hungary
    MS-Off Ver
    Office 2010
    Posts
    7

    Error 438 - object doesn't support this property or method by chart.setsourcedata

    Hello everyone!

    I would need your help with the following issue:
    I'm trying to create a macro, which loops through the selected worksheets, opens a powerpoint template for each, replaces some text and also changes the data source of the embedded charts with the pivot table range of that specific chart on the selected worksheet. My problem was initially, that there are several charts on each worksheet, but each sheet has the same set of charts (e.g. performance, top 10 searches). So I tried to set the embedded chart source by validating the pivot table name. But now I get run-time error 438 - object doesn't support this property or method by defining the cht.Chart.SetSourceData Source. But if I change the source to Sheets(solutionName).Range("a1") the code runs without error, but the chart doesn't get updated with the new source.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Error 438 - object doesn't support this property or method by chart.setsourcedata

    You don't need a worksheet reference for pt.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    05-26-2017
    Location
    Budapest, Hungary
    MS-Off Ver
    Office 2010
    Posts
    7

    Re: Error 438 - object doesn't support this property or method by chart.setsourcedata

    Thanks Norie!
    That really solved the error. I forgot, that I already set pt with sheet variable.
    My code runs without error now, but neither the texts are replaced with the function (though this worked fine before) nor the embedded charts in Powerpoint are getting updated, although the ppt template opens fine.

  4. #4
    Registered User
    Join Date
    05-26-2017
    Location
    Budapest, Hungary
    MS-Off Ver
    Office 2010
    Posts
    7

    Re: Error 438 - object doesn't support this property or method by chart.setsourcedata

    Now I separated the code for changing the embedded chart source and changed it a bit. The code runs without error, but it still doesn't changes the chart source.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-26-2017
    Location
    Budapest, Hungary
    MS-Off Ver
    Office 2010
    Posts
    7

    Re: Error 438 - object doesn't support this property or method by chart.setsourcedata

    Actually the original error got resolved, so I will post a new thread for the other issue.

+ 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. [SOLVED] Object doesn't support this property or method (Error 438)
    By VAer in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-14-2017, 11:15 AM
  2. Error Object doesn't support this property or method
    By rongil20 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-14-2015, 06:57 AM
  3. [SOLVED] Getting run-time error object doesn't support this property or method
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-22-2015, 02:14 AM
  4. Object Doesn't support this property or method Error
    By andrew c. in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-13-2011, 02:07 PM
  5. Run-Time Error '438' - Object doesn't support this property or method
    By rajibyumnam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-26-2011, 03:24 AM
  6. error '438', Object doesn't support this property or method.
    By ironmonkey888 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-23-2010, 09:23 AM
  7. Replies: 1
    Last Post: 07-12-2005, 04:05 PM

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