+ Reply to Thread
Results 1 to 3 of 3

Writing Code for creating pivot table

  1. #1
    Registered User
    Join Date
    07-18-2011
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    31

    Writing Code for creating pivot table

    Dear all,

    I wrote the code in creating pivot table for my source of data.
    However, when run the code, it prompts with the message. (I use Excel 2000)

    "Run-time error '438':
    Object doesnt support this property or method"

    Below please find the code also.

    ****************************
    Please Login or Register  to view this content.
    ****************************

    Thanks in advance!!

    Darwin Chan
    Attached Files Attached Files
    Last edited by pike; 10-26-2011 at 01:57 AM. Reason: add code tags for newbie PM rule

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Writing Code for creating pivot table

    A lot of observations here for you to check your code.
    1. You do not have to add a new sheet for the pivot, it will automatically go to a blank sheet or create one when creating the pivot.

    2. You have coded the following -
    Please Login or Register  to view this content.
    You cannot specify the destination as Range("A3"). You need to specify the sheet where this range is present. You do not need to do this as well, since the pivot code takes care of it.

    3. You have not specified a "Data" field in the pivot. Without that, the pivot wont work. I have just taken a dummy field (bl_number) in my code below.

    4. See this code and let me know if it gives you any error.
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Writing Code for creating pivot table

    Did this work for you?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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