+ Reply to Thread
Results 1 to 5 of 5

Copy Charts from several worheets into new one

  1. #1
    Registered User
    Join Date
    07-07-2021
    Location
    Brazil
    MS-Off Ver
    2016
    Posts
    8

    Copy Charts from several worheets into new one

    Hi guys! I am working with a workbook that contains over 200 worksheets with one chart each. I would like to copy all charts from the worksheets and paste it into a new one.

    Would anyone know a macro/VBA that could help me out with this?

    I appreciate the help!

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Copy Charts from several worheets into new one

    for instance:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    07-07-2021
    Location
    Brazil
    MS-Off Ver
    2016
    Posts
    8

    Re: Copy Charts from several worheets into new one

    Hi, Kaper! I really appreciate you taking the time to help me!
    I tried to apply the code and I keep getting the following error message: "Run-time error of -2147221040(8004010d)-The specified dimension is not valid for the current chart type". And the error keeps pointing to this line:

    wks.ChartObjects(1).Cut


    This evens happens on the sample you kindly sent me. It only copies the first two charts and then it stops. I tried it on my own workbook and the same happens. I tried to look it up a way to solve it but I couldn't find anything to help it. Any ideas on how to solve it?

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Copy Charts from several worheets into new one

    Have no foggiest idea why it happens.
    And cannot obtain such an error.

    In my case (my file and Excel 365) everything is copied.
    The only thing which comes to my mind is a problem with specific chart type in Excel 2016. If in case of my file it stops after 2 charts copied, then may be a problem is with clustered bar chart?.
    You can try removing Sheet3 and all it's copies - Sheet3 (1) and so on - from my file and then run the code.
    If it works smoothly, then we can try to study the case in detail.

  5. #5
    Registered User
    Join Date
    07-07-2021
    Location
    Brazil
    MS-Off Ver
    2016
    Posts
    8

    Re: Copy Charts from several worheets into new one

    I tried removing all bar charts as you suggested but still get the same error. Tried changing the chart types/ creating new ones too but no progress either. I'm sorry for making you waste your time.

+ 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] Copy Excel Charts to PPT (Minimum 4 Charts on each PowerPoint Page)
    By E5254730 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-01-2016, 02:36 PM
  2. Replies: 0
    Last Post: 01-14-2016, 05:18 AM
  3. Replies: 0
    Last Post: 10-12-2015, 03:25 AM
  4. Replies: 2
    Last Post: 09-15-2015, 04:12 AM
  5. How to copy charts
    By bob777 in forum Excel General
    Replies: 0
    Last Post: 11-30-2005, 05:46 AM
  6. Copy/Paste charts
    By Rui in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-22-2005, 05:05 PM
  7. [SOLVED] Copy/Paste charts
    By Rui in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-21-2005, 06: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