+ Reply to Thread
Results 1 to 2 of 2

Error when creating pivot table based on user date range selection

  1. #1
    Forum Contributor
    Join Date
    08-08-2015
    Location
    North Carolina USA
    MS-Off Ver
    MS Office 2016
    Posts
    368

    Error when creating pivot table based on user date range selection

    Hi, I am getting the error: Run-time error '5' - Invalid procedure call or argument

    at the line: ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:="WOF" _
    , Version:=6).CreatePivotTable TableDestination:="Who's On 1st!R2C1", _
    TableName:="PivotTable3", DefaultVersion:=6

    of the following code.. Whats happening is on the sheet "FLHearingsMaster" there is a table.. and there is a button to run the macro WOF - Which prompts the user for a start date and then a finish date... it filters the table (Table_FLHearings) by the date range.. (dates are in table column 6) and then moved that data to another sheet named "Who's on 1st Data" where it creates a table named "WOF" then, and this is where its causing the error, I want it to insert the pivot table, based on the table "WOF"...

    does anyone know what I am doing wrong here by chance?



    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    08-08-2015
    Location
    North Carolina USA
    MS-Off Ver
    MS Office 2016
    Posts
    368

    Re: Error when creating pivot table based on user date range selection

    I was able to figure this out.

+ 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. Filter pivot table based on named range - Error 1004
    By Upset in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-11-2015, 05:42 AM
  2. Dynamic Range, based on user selection, used with FOR LOOP
    By ericbartha in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-01-2015, 05:08 PM
  3. [SOLVED] Creating a Pivot Table based off an ever changing range...
    By Joven76 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 09-17-2014, 10:23 AM
  4. Replies: 9
    Last Post: 02-26-2014, 04:17 PM
  5. Data table based on user selection and index/match
    By pauldaddyadams in forum Excel General
    Replies: 0
    Last Post: 10-19-2012, 07:58 AM
  6. [SOLVED] Pivot Table Error: 'CANNOT GROUP THAT SELECTION'
    By Rhino_dance in forum Excel General
    Replies: 5
    Last Post: 09-20-2012, 11:35 AM
  7. changing range selection for pivot table based on worksheet
    By twhitezell in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-07-2010, 11:49 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