+ Reply to Thread
Results 1 to 2 of 2

Can you create a Macro that will create a Pivot

  1. #1
    Registered User
    Join Date
    06-10-2014
    Posts
    10

    Can you create a Macro that will create a Pivot

    I am trying to create a Macro that will create a pivot table. I am getting the error below what I try to run the command. I have tried to have the pivot create a new tab for the pivot and I have tried creating the pivot on an already created tab. Any idea why I am getting this error?


    ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
    "835!R1C1:R1048576C6", Version:=6).CreatePivotTable TableDestination:= _
    "Sheet3!R3C1", TableName:="PivotTable2", DefaultVersion:=6

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Can you create a Macro that will create a Pivot

    .
    Please Login or Register  to view this content.

    https://excelchamps.com/blog/vba-to-create-pivot-table/
    Attached Files Attached Files

+ 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. How to create a dynamic macro that will create pivot table
    By thlee1122 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-08-2015, 11:49 PM
  2. How to create a macro to create a pivot table on a new sheet
    By thlee1122 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2015, 11:14 AM
  3. Create a macro to create a pivot table in a worksheet
    By Triscia in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-15-2015, 10:53 AM
  4. Replies: 0
    Last Post: 03-10-2015, 03:34 PM
  5. [SOLVED] VBA Create Pivot Macro
    By bkeat in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-24-2014, 08:36 AM
  6. Replies: 0
    Last Post: 07-25-2013, 05:24 PM
  7. Macro to create pivot table/pivot chart
    By Karina in forum Excel General
    Replies: 2
    Last Post: 10-27-2011, 10:33 PM

Tags for this Thread

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