Results 1 to 3 of 3

Thread: Excel Pivottable

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    27
    Hello

    I have a problem in trying to create a pivottable using external data.

    The following errors are displayed when run
    -Unable to set the orientation property of the Pivotfield class
    -Unable to set the position property of the Pivotfield class
    -Unable to set the function property of the Pivotfield class
    -Application defined or object defined error

    this is the code where the error occurs
    Code:
     dataSheet.PivotTableWizard SourceType:=xlDatabase, SourceData:= _
                dataSheet.Range(dataSheet.Cells(1, 1), _
                    dataSheet.Cells(dataSheet.Cells(1, 1).End(xlDown).Row, _
                        dataSheet.Cells(1, 1).End(xlToRight).Column)), _
                TableDestination:=.Cells(14, 1), TableName:="CashReqsPivotTable"
        
            With .PivotTables("CashReqsPivotTable")
            
                .PivotFields("Vendor Number").Subtotals = NoSubtotalsArray
                .PivotFields("Invoice Number").Subtotals = NoSubtotalsArray
                .PivotFields("Document Date").Subtotals = NoSubtotalsArray
                .PivotFields("Due Date").Subtotals = NoSubtotalsArray
                .AddFields RowFields:=Array("Vendor Number", "Vendor Name", _
                    "Invoice Number", "Document Date", "Due Date", "Data"), _
                    PageFields:=Array("Terms", "Vendor Currency", "Account Set", _
                    "Vendor Group")
                    
                'Setup the aging period columns
                With .PivotFields("Overdue ") 
                    .Orientation = xlDataField
                    .Name = "Overdue"
                    .Function = xlSum
                    .NumberFormat = numFormat
                    .Position = 1
                End With
                
                With .PivotFields("Current ") 
                    .Orientation = xlDataField
                    .Name = "Current"
                    .Function = xlSum
                    .NumberFormat = numFormat
                    .Position = 2
                End With
    Any help in fixing this problem is appreciated

    Regards

    AP

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    27
    Seeing that this question is to hardcore for anyone to rely or view could anyone recommend to me a good excel vba forum to go to.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    27

    Thumbs down Still Waiting

    I'm still waiting to see if anyone can give me an answer to this question??


Posting Permissions

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



Click Here to Expand Forum to Full Width