+ Reply to Thread
Results 1 to 2 of 2

VBA create pivot table in excel 2010 defaulted to 2003 pivot table format

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-19-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Office365
    Posts
    276

    VBA create pivot table in excel 2010 defaulted to 2003 pivot table format

    Hello,

    I'm using excel 2010 and trying to create pivot tables using VBA, the problem is that the pivot tables being created automatically default to the 2003 format (i.e. data fields are stacked/vertical rather than horizontal. what can I do to make it default to 2010 format when created?

    thanks,

  2. #2
    Forum Contributor
    Join Date
    06-19-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Office365
    Posts
    276

    Re: VBA create pivot table in excel 2010 defaulted to 2003 pivot table format

    Set PRange = WSD.Cells(1, 1).CurrentRegion
    Set PTCache = ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=PRange.Address, _
    Version:=xlPivotTableVersion14)

    Set PT = PTCache.CreatePivotTable(TableDestination:=Worksheets("sheet2").Cells(1, 1), TableName:="PivotTable1", _
    DefaultVersion:=xlPivotTableVersion14)

+ 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: 6
    Last Post: 01-24-2017, 06:56 PM
  2. Excel 2010 Pivot Table - Create Macro to update source data
    By swaza in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 07-29-2015, 06:59 AM
  3. Custom Format Code for Pivot Table - Excel 2010
    By Linus100 in forum Excel General
    Replies: 0
    Last Post: 08-28-2014, 01:40 PM
  4. Pivot table date format issue when drop down run on VBA - Excel 2003
    By NotBright in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-14-2014, 06:28 AM
  5. [SOLVED] Date Format not Working in Excel 2010 in Pivot Table
    By Lazor78 in forum Excel Charting & Pivots
    Replies: 12
    Last Post: 09-10-2013, 11:28 AM
  6. Error when running a macro to create a pivot table in Excel 2010
    By Nandeep in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2012, 11:31 AM
  7. Date Format in Pivot table Row field (Excel 2003)
    By DavidBW in forum Excel General
    Replies: 4
    Last Post: 01-30-2012, 05:46 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