+ Reply to Thread
Results 1 to 2 of 2

Excel macro to copy and paste a chart and a table to a new workbook

  1. #1
    Registered User
    Join Date
    08-12-2013
    Location
    orlando
    MS-Off Ver
    Excel 2007
    Posts
    4

    Excel macro to copy and paste a chart and a table to a new workbook

    I have an Excel 2010 file that contains many worksheets. On each worksheet, I have a chart and and several tables resulting from a series of calculations, I would like to create a macro that will copy the chart and two of the summary tables to a new workbook. I tried to record a macro. but each time it gives an error about the book name. Thank you for your help!
    Sub Macro1()
    ' Macro1 Macro
    '
    Range("B41:h128").Select
    Selection.Copy
    Workbooks.Add
    Range("B4").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Columns("B:B").EntireColumn.AutoFit
    Columns("C:C").EntireColumn.AutoFit
    Windows("system.xlsm").Activate
    ActiveSheet.ChartObjects("Chart 7").Activate
    Application.CutCopyMode = False
    ActiveChart.ChartArea.Copy
    Windows("Book5").Activate Range("j6").Select
    ActiveSheet.Paste

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Excel macro to copy and paste a chart and a table to a new workbook

    Hi there,

    Try the following code and see if it works for you:

    Please Login or Register  to view this content.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

+ 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: 05-08-2013, 02:47 PM
  2. Replies: 4
    Last Post: 02-01-2013, 12:00 PM
  3. [SOLVED] Macro for Copy/Paste from one workbook to another in Excel 2007
    By Blackjack12 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-20-2012, 07:36 PM
  4. Macro excel to copy and paste table from Word
    By Shunlee in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-16-2008, 06:52 AM
  5. Replies: 1
    Last Post: 10-17-2005, 04: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