+ Reply to Thread
Results 1 to 3 of 3

VBA Pivot table error

  1. #1
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    VBA Pivot table error

    Hi All,

    I have created a macro to create a pivot table by going into an access database and then place fields into their respective places. then once the table is created i copy the data out and do some things to it. The problem is that this will work perfect for all of my little tables that are in access, but once the table gets beyond a certain size i get a vba error where it has created the pivot table report and linked it to access, but it will not put any values into the row labels. To trouble shoot i tried to maually drag the fields into row labels and i get a microsoft error "A field in your source data has more unique items than can be used in a pivottable report. Microsoft excel may not be able to create the report, or may create the report without the data from this field." I have done this process manually many times, in fact just recently created a macro to do it for me, so i know that the table will fit. In fact i have tried to delete the pivot table the macro created and manually create one and link it to the access table and it worked just fine. then i can just run my code as normal and skip the create a pivot table command. I am wondering why i can create a pivot table manually, but excel will get an error when the table is too big?? any help is greatly appretiated. Below i have placed my code so that you can see what i am doing. Please let me know if you need more information. Thanks.


    Please Login or Register  to view this content.
    The VBA Error i get by the way is Run-time error '1004':
    Unable to set the Orientation property of the PivotField Class
    Last edited by amotto11; 02-22-2013 at 01:00 PM.

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

    Re: VBA Pivot table error

    perhaps
    Please Login or Register  to view this content.
    instead of
    Please Login or Register  to view this content.
    Josie

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

  3. #3
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: VBA Pivot table error

    Joseph,

    Thank you so much, i did not think it would be that easy, but thanks again!
    Last edited by amotto11; 02-22-2013 at 01:22 PM.

+ 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