Results 1 to 3 of 3

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

Threaded View

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

    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:

        ChartObj.Chart.Export _
                       Filename:=wbBook.Path & "\" & stChartName, _
                       Filtername:="PNG"
    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:

        Const stChartName As String = "Chart2.png"
        Dim ChartObj As ChartObject
        Set ChartObj = wsSheet.ChartObjects("Chart 2")


    EDIT: The yellow arrow is pointing at this section of the code:
                       Filtername:="PNG"
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

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. 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