Results 1 to 3 of 3

Run-time Error '1004' Pivotfield name is not valid

Threaded View

polooop Run-time Error '1004'... 02-18-2014, 01:02 PM
Norie Re: Run-time Error '1004'... 02-18-2014, 01:15 PM
polooop Re: Run-time Error '1004'... 02-19-2014, 04:45 AM
  1. #1
    Registered User
    Join Date
    02-18-2014
    Location
    France
    MS-Off Ver
    Excel 2010
    Posts
    30

    Run-time Error '1004' Pivotfield name is not valid

    Hello everybody,

    I'm quiet but not really a beginner in VBA and today i went on an error which it seems, i can t solve alone. So i'm asking your help there. I'm doing a project consisting in "variance" analysis on several excel tables and everything worked fine till i get to the end but today, i just update the different tables and now get this error 1004 saying :

    "Run-time error '1004': The Pivot Table field name is not valid. To create a Pivot Table report, you must use data that is organized as a list with labeled columns. If you are changing the name of the Pivot Table field, you must type a new name for the field."

    As in my different tables I don t see any difference on the first row and not any blank i wonder from where it could be coming.

    Here a part of my code may be someone will see what is wrong here. (It worked fine till today!)

    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer

    Sub Generer_TCD_FC()
    
    Sheets("Sales Plan vs Prod Plan").Cells(1, 46) = "QuantiteM"
    Sheets("Sales Plan vs Prod Plan").Cells(1, 47) = "DescriptionM"
    Dim aCache As Object
    
    
    'Application.ScreenUpdating = False
    
    Application.DisplayAlerts = False
    Worksheets("TCD FC").Delete
    Application.DisplayAlerts = True
    Sheets("Donnees cables").Select
    Sheets.Add
    ActiveSheet.name = "TCD FC"
    ActiveWorkbook.RefreshAll
    
    
    
    Sheets("TCD FC").Select
    
       Set aCache = ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
            "Sales Plan vs Prod Plan!R1C1:R1048576C48", Version:=xlPivotTableVersion14)
        
        aCache.CreatePivotTable TableDestination:=Worksheets("TCD FC").Range("A1"), TableName:="PivotTable11", DefaultVersion:=xlPivotTableVersion14
    The error occurs on the last line.

    Please someone help me!
    Last edited by polooop; 02-19-2014 at 04:46 AM. Reason: code tags, Solved

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA problem with Print Range code run-time error 1004 text not valid reference
    By Jeep56 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-14-2013, 03:38 PM
  2. Need help fixing macros due to Run-Time error 1004 Sort Reference is Not Valid
    By travisg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2013, 12:13 AM
  3. runtime 1004 error 'Unable to get the Pivotitems property of the Pivotfield class'
    By DavidBW in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-01-2012, 10:36 AM
  4. Run time error 1004 Reference is not valid on GoalSeek
    By Ted Heaslip in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-10-2009, 09:28 AM
  5. pivot table refresh - error 1004 - reference is not valid
    By jrussell in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-14-2008, 05:08 PM

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