+ Reply to Thread
Results 1 to 7 of 7

VBA Pivot Table Object Property Not Recognised in Excel 2003?

  1. #1
    Forum Contributor
    Join Date
    04-13-2010
    Location
    England
    MS-Off Ver
    Office 2016 365
    Posts
    211

    VBA Pivot Table Object Property Not Recognised in Excel 2003?

    Hi,

    I am designing a report that will export a couple of sheets to a new workbook and break the links. One sheet has a pivot table on it.

    I am on Excel 2010 but i know Users are on 2003 so i have been creating this report in compatibility mode.

    I have the following line of code that gives the Pivot Table on the newly created workbook it's source data.

    It works fine in 2010 but not in 2003 - i get a property not supported error. Anyone know how to rewrite this to work in 2003? Have been googling without much success

    Thanks very much in advance,

    J


    Please Login or Register  to view this content.
    =xlPivotTableVersion10

    Is this the property that is failing? Could it be as simple as

    =xlPivotTableVersion03

    ??

  2. #2
    Forum Contributor
    Join Date
    04-13-2010
    Location
    England
    MS-Off Ver
    Office 2016 365
    Posts
    211

    Re: VBA Pivot Table Object Property Not Recognised in Excel 2003?

    =xlPivotTableVersion - 1

    I managed to get on a user's machine and tried the above but it still failed....

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: VBA Pivot Table Object Property Not Recognised in Excel 2003?

    in 2003 and earlier you need
    Please Login or Register  to view this content.
    instead of .Create
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Forum Contributor
    Join Date
    04-13-2010
    Location
    England
    MS-Off Ver
    Office 2016 365
    Posts
    211

    Re: VBA Pivot Table Object Property Not Recognised in Excel 2003?

    Quote Originally Posted by JosephP View Post
    in 2003 and earlier you need
    Please Login or Register  to view this content.
    instead of .Create
    I tried this and removed the Pivot Table version argument - managed to get on user's machine and it still failed with the object property error....

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: VBA Pivot Table Object Property Not Recognised in Excel 2003?

    I overlooked the ChangePivotCache method call-that doesn't exist in 2003 either. you have to alter the cacheindex property instead to the index of the new pivotcache

  6. #6
    Forum Contributor
    Join Date
    04-13-2010
    Location
    England
    MS-Off Ver
    Office 2016 365
    Posts
    211

    Re: VBA Pivot Table Object Property Not Recognised in Excel 2003?

    I've been trying to find the correct syntax for this property but can't find it on google - any idea how i alter my code to include it?

    Quote Originally Posted by JosephP View Post
    I overlooked the ChangePivotCache method call-that doesn't exist in 2003 either. you have to alter the cacheindex property instead to the index of the new pivotcache

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: VBA Pivot Table Object Property Not Recognised in Excel 2003?

    Please Login or Register  to view this content.
    for instance or if you have a pivotcache variable called PC
    Please Login or Register  to view this content.
    if you're trying to create a new cache just to assign to this pivot table I seem to recall you have to create a new blank pivot table from the new cache before you can actually use its index property

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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