+ Reply to Thread
Results 1 to 3 of 3

Method 'Export' of Object '_Chart' Failed - OneDrive & SharePoint Issue

  1. #1
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Method 'Export' of Object '_Chart' Failed - OneDrive & SharePoint Issue

    I am completely flummoxed. I managed to put together a piece of code to extract various bits of data from an Excel workbook and paste them into a Word document. Part of this process extracts a chart as a .png file. This was working seamlessly two weeks ago, but today, when I come to run the code, it is failing at this line:

    Please Login or Register  to view this content.
    Absolutely NOTHING has been changed in the code, and NOTHING has been moved on my PC. I really don't know where to start looking for the reason why this no longer wants to work. Anyone any ideas?

    Relevant bits in the code that precede this section are:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.


    EDIT: The yellow arrow is pointing at this section of the code:
    Please Login or Register  to view this content.
    Changing this to GIF makes no difference.

    I am getting a tooltip appearing at the point at which the code is highlighted in yellow saying "ActiveWorkbook = empty" - is this significant?
    Last edited by AliGW; 06-09-2019 at 01:29 PM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: Method 'Export' of Object '_Chart' Failed

    So I have discovered that this has something to do with OneDrive. The file in question has always existed on OneDrive and worked very happily before, but just at the moment it isn't. I have reset OneDrive and am waiting for it to resynchronise itself, then will try again and report back.

    The code runs fine if I move the file to an ordinary folder on the PC. I am hoping that it's just a case of OneDrive having got its knickers in a bit of a twist.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: Method 'Export' of Object '_Chart' Failed

    All sorted. I have simply hard coded the file path into the VBA code instead of using wbBook.Path, and it's now working fine with my OneDrive (SharePoint).

    Thanks to anyone who looked!

+ 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. Replies: 0
    Last Post: 06-15-2017, 05:34 AM
  2. Create multiple pivot charts [Error: Method 'SetSourceData' of object '_chart' failed]
    By DianCharloValentine in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-26-2014, 07:51 AM
  3. Run time error 50034 method export of object vb component failed
    By Libster78 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-31-2010, 05:16 AM
  4. method 'location' of object '_Chart' failed.
    By Hendel in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-29-2008, 01:03 PM
  5. Method 'SeriesCollection' of object '_Chart'failed
    By Dennis Mak in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-08-2006, 02:55 AM
  6. Run-time error '1004'; Method 'Export' of object'_Chart' failed
    By Father Guido in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-25-2005, 10:35 AM
  7. [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