+ Reply to Thread
Results 1 to 7 of 7

Macro for copying charts to another workbook and pasting as an picture?

  1. #1
    Registered User
    Join Date
    11-16-2009
    Location
    Tucson, AZ
    MS-Off Ver
    Excel 2003
    Posts
    24

    Macro for copying charts to another workbook and pasting as an picture?

    Ok, I'm building a macro that resides in my master template and then creates a new workbook. To which it then copies each specified tab and does a paste values only along with the formats into each of the new tabs and renames the tabs. Basically, I'm creating a "dumb" sheet so my sales & marketing guys cant jack it up.

    What I'm running into is that there are a few charts that aren't being copied when I select the whole sheet and I'd like to paste them into the new workbook as pictures... for example, if you copy a chart and paste it into another Excel sheet it'll pull all of the source links, but if you paste into Word, and then cut it out and paste it into an Excel worksheet it automatically becomes a picture. Is there a way to do this programmaticly? I've tried to record macros several different ways, but it always ignores the paste into Word part, it's like it doesn't happen. Anyone have a tip or a point in the right direction?
    Thanks!
    Chad

  2. #2
    Registered User
    Join Date
    11-16-2009
    Location
    Tucson, AZ
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Macro for copying charts to another workbook and pasting as an picture?

    Ok, I figured it out... Basically, if you select the chart, hit shift and go pull down Edit there is a "Copy Picture" option that's not there with just Edit pulled down... or in VBA you can...

    Please Login or Register  to view this content.
    Easy as pie!
    Enjoy!
    Chad

  3. #3
    Registered User
    Join Date
    03-06-2013
    Location
    malaysia
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Macro for copying charts to another workbook and pasting as an picture?

    I got the reply of RUn time error 1004
    paste worksheet class failed

    i'm a newbee in VBA therefore i just copy the code
    The code work at the first time. After that it appear runtime error 1004


    Please Login or Register  to view this content.
    Last edited by arlu1201; 03-07-2013 at 01:41 AM.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,767

    Re: Macro for copying charts to another workbook and pasting as an picture?

    Replace this

    Please Login or Register  to view this content.
    With

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  5. #5
    Registered User
    Join Date
    03-06-2013
    Location
    malaysia
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Macro for copying charts to another workbook and pasting as an picture?

    Still error

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,767

    Re: Macro for copying charts to another workbook and pasting as an picture?

    Oopss... please dont post your question on someone's thread, please start a new thread.

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro for copying charts to another workbook and pasting as an picture?

    Also ezra,

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature below this post.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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