+ Reply to Thread
Results 1 to 5 of 5

Loose Embedded Graph Values when copying sheet to new workbook

  1. #1
    Forum Contributor
    Join Date
    05-02-2012
    Location
    Mosselbaai, Suid Afrika
    MS-Off Ver
    Excel 2016
    Posts
    107

    Loose Embedded Graph Values when copying sheet to new workbook

    Loose Embedded Graph Values when copying sheet to new workbook:

    What I would like to do is to, with VBA, copy two sheets from a workbook to a new workbook without loosing any values or formatting. The one sheet contains formulas and embedded charts and the other is a chart sheet. Only values and formatting must be copied to the new workbook and the charts/graphs must retain there values and appearance. The problem I am experiencing is that the charts loose their values. See attached example sheet.

    Thank you,

    Regards

    Similar thread at:
    http://www.vbaexpress.com/forum/show...d-formats-only
    Attached Files Attached Files

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Loose Embedded Graph Values when copying sheet to new workbook

    Goeie Middag Henk Stander,

    Instead of creating a new Workbook and wanting to Copy and Paste, let us try it this way round.

    First of all, you will have to go to Tools>Macro>Security - Trusted Publishers and check Trust access to Visual Basic Editor before running the attached sample Workbook.

    After clicking on the Button, a Save File As screen will appear where you may enter the new Workbook name.
    NOTE: Be careful here, because if you don't enter a different name, the actual active Workbook you are working with will be replaced, with some Sheets lost, and stripped of all VBA Code!

    See if you can make do with this, otherwise we shall have to consider other alternatives.

    Baie dankie,

    Regards
    Attached Files Attached Files
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Contributor
    Join Date
    05-02-2012
    Location
    Mosselbaai, Suid Afrika
    MS-Off Ver
    Excel 2016
    Posts
    107

    Smile Re: Loose Embedded Graph Values when copying sheet to new workbook

    Hi Winon,

    Definitely an approach that can work.
    This could be a problem: "First of all, you will have to go to Tools>Macro>Security - Trusted Publishers and check Trust access to Visual Basic Editor before running the attached sample Workbook."

    This program will be run be others, rather excel illiterate. The intent is to at the end of the year run the macro, which will then save the file with a specific name relating to the year. This then becomes the data for the completed year.

    I am still pursuing the original approach and have made some progress, not as elegant as your solution though.

    In any case, this is very useful information and a very useful example, thanks.

    Baie dankie

    Regards.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Loose Embedded Graph Values when copying sheet to new workbook

    This seems to work

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  5. #5
    Forum Contributor
    Join Date
    05-02-2012
    Location
    Mosselbaai, Suid Afrika
    MS-Off Ver
    Excel 2016
    Posts
    107

    Re: Loose Embedded Graph Values when copying sheet to new workbook

    Quote Originally Posted by Andy Pope View Post
    This seems to work

    Please Login or Register  to view this content.
    It does indeed sir, I am honored to receive a reply from you. It does exactly what is required in a short to the point manner, thank you so much.

    Regards

+ 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] Copying embedded charts from chart sheet
    By derek8 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 07-24-2013, 06:21 PM
  2. Replies: 10
    Last Post: 05-01-2013, 05:52 AM
  3. Most efficient macro to loose any formulas on whole sheet
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-12-2011, 04:08 PM
  4. Excel 2007 : Copying a sheet with a chart embedded 2007
    By Frankwin in forum Excel General
    Replies: 3
    Last Post: 04-14-2010, 10:13 PM
  5. Copying a graph to a new workbook
    By Dial1 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-24-2010, 07:17 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