Results 1 to 2 of 2

VBA to copy pivot table values and formatting

Threaded View

  1. #1
    Registered User
    Join Date
    09-04-2014
    Location
    Slovakia
    MS-Off Ver
    Standard 2013
    Posts
    1

    VBA to copy pivot table values and formatting

    Hello,
    I created macro to copy pivot tables from 3 sheets - just values and formatting, but it doesn't work properly - the pivot is green, but in "Copy file" it's grey and also sheets name aren't good (I need to keep the original name).
    Thanks for Advice

    Sub ExportToXLSX()
    Sheets(Array("XYZ", "ABC", "DEF")).Select
    ActiveSheet.Cells.Copy
    Workbooks.Add
    ActiveCell.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
    ActiveCell.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
    ActiveWorkbook.SaveAs Filename:="d:\Users\atothova\Desktop\Copy.xlsx"
    ActiveWorkbook.Close
    End Sub
    Last edited by atothova; 09-05-2014 at 07:59 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Change pivot table to values but keep formatting
    By DaveF in forum Excel General
    Replies: 4
    Last Post: 11-21-2016, 12:09 PM
  2. [SOLVED] Copy Column in pivot table and paste values
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-26-2014, 09:32 AM
  3. Macro to copy pivot table as values and preserve all formatting
    By Gary1980 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-28-2012, 09:23 AM
  4. copy pivot table values and formatting only
    By jrussell in forum Excel General
    Replies: 13
    Last Post: 09-25-2012, 10:33 AM
  5. Copy values from a pivot table
    By booo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-23-2010, 02:10 PM

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