+ Reply to Thread
Results 1 to 2 of 2

Run-time error '5' when trying to create Pivot Table

  1. #1
    Registered User
    Join Date
    08-12-2011
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2010
    Posts
    20

    Run-time error '5' when trying to create Pivot Table

    G'day all -

    I'm getting a run-time error '5' (invalid procedure call or argument) when trying to create a pivot table using VBA. Below is a sampling of my code. I've done some amateurish VBA coding for years & am somewhat familiar with pivot tables, but I'll admit this is my first time trying to create a pivot table using VBA.

    Perhaps I'm going about it wrong? My first step was creating a new sheet for the pivot table to be created in, and then name the range I want to use. That's working fine. I run into an error in the next step. From what I am reading, I have to create a pivot cache and then the table using VBA, but no matter how I go about doing it I get an error. What I have below is basically from a macro I recorded (probably sloppy, I know) because nothing I was writing was working. Any help would be appreciated tremendously!!

    Please Login or Register  to view this content.
    Thanks,
    Tom

  2. #2
    Registered User
    Join Date
    08-12-2011
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Run-time error '5' when trying to create Pivot Table

    Problem solved, got it working.

+ 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. Recording Macro to create a Pivot Table in Excel 2013: run time error 5 invalid procedure
    By developerstew in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-25-2013, 07:17 AM
  2. Get type mismatch error when trying to create pivot table
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 09-04-2013, 01:06 PM
  3. [SOLVED] Error in a recorded macro to create Pivot Table
    By aadeshgandhi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-21-2012, 12:40 PM
  4. Pivot table and Pivot Chart - Run time error 5
    By yogananda.muthaiah in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-30-2012, 08:35 AM
  5. [SOLVED] Pivot table run time error
    By dabrows in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-07-2012, 02:22 PM
  6. Create pivot table - error 1004
    By Brontosaurus in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-23-2011, 06:37 PM
  7. create pivot table - tabledestination error 1004
    By Brontosaurus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-20-2011, 05:35 PM
  8. Error 400 when trying to create pivot table
    By Brontosaurus in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-12-2011, 03:06 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