Results 1 to 2 of 2

Using Macro recorder with Pivot Tables

Threaded View

  1. #1
    Registered User
    Join Date
    08-01-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    11

    Using Macro recorder with Pivot Tables

    Hi guys,

    I am trying to build a macro for the creation of pivot tables. Since I am very new to excel, i cannot code this myself and have resorted to using the macro recorder.

    However, after i have recorded my macro and i try to run it i get the following error:

    Run-time error '5'

    Invalid procedure call or argument


    In the debugger, this portion of the code is highlighted(it is right at the top):

    ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
            "Graydon-TL!R1C1:R15507C17", Version:=xlPivotTableVersion14). _
            CreatePivotTable TableDestination:="Sheet3!R1C1", TableName:="PivotTable4" _
            , DefaultVersion:=xlPivotTableVersion14


    Would anyone please be able to explain how I should go about fixing this?

    What I am doing doesnt even seem to complex. I simply start the recorder, hit insert pivot chart, set up the correct fields in the pivot table, fix up the pivot chart type and then I stop recording.


    Any help, tips or pointers would be greatly appreciated!


    Cheers,
    Nima
    Last edited by arlu1201; 09-05-2012 at 04:06 AM.

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