Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Pivot add field error (Excel 2003)

    I have the following code recorded.

    ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _
    "Ronel!C1:C3").CreatePivotTable TableDestination:= _
    "'[Ronel dated 02 02 2007 Supplier with Access Levels.xls]Sheet1'!R1C1", _
    TableName:="PivotTable1", DefaultVersion:=xlPivotTableVersion10
    ActiveSheet.PivotTables("PivotTable1").AddFields RowFields:="GroupAdmin_ID", _
    ColumnFields:="Access_Desc"

    If I run this it gives me the following error "Add fields method of Pivot Table class failed. Can someone please help

    TIA

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Pivot add field error (Excel 2003)

    Your source data range consists of only 3 cells in one column (C1:C3). That is not enough to create a pivot table from - you need at least two columns.

  3. #3
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pivot add field error (Excel 2003)

    Thanks Hans.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •