+ Reply to Thread
Results 1 to 2 of 2

Copy Pivot Table, Insert to new Workbook

Hybrid View

  1. #1
    Registered User
    Join Date
    06-18-2012
    Location
    Denver
    MS-Off Ver
    Excel 2007
    Posts
    2

    Copy Pivot Table, Insert to new Workbook

    Hi Guys,

    I’m new the VBA, and after a full day of racking my brain I come to you genius men and women for some help.

    I am trying to copy a Pivot Table form one Workbook and Insert this pivot Table into another Workbook (a specific location within the file).

    Any ideas?

    Thanks,
    pualive

  2. #2
    Registered User
    Join Date
    06-18-2012
    Location
    Denver
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Copy Pivot Table, Insert to new Workbook

    So this is basically what i've been able to come up with so far. This allows me to copy then pivot table and paste it to Sheet3. What i need is for the paste location to be in a differenet workbook at a specified location.

    Sub CopyPastePivotTable()

    'Copy Pivot Table
    Dim PT As PivotTable
    For Each PT In Sheets("2012 Pivot").PivotTables
    PT.TableRange2.Copy
    With Sheets("Sheet3").Range(PT.TableRange2.Address)
    .PasteSpecial xlPasteValuesAndNumberFormats
    .PasteSpecial xlPasteColumnWidths
    End With
    Application.CutCopyMode = False
    Next PT

    End Sub

+ 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