VBA PivotTable Erstellen, Type Mismatch? Was Mache Ich Falsch?

Immer "Type Mismatch" auf der Linie tabledestination:=("pivot!A3")
Ich möchte hinzufügen, ein Blatt mit dem Namen "Pivot" und PivotTable erstellen, die auf das Blatt.

Dim pt As PivotTable
Dim Pcache As PivotCache
Sheets.add.name = "Pivot"
Sheets("DATA").Select
Set Pcache = ActiveWorkbook.PivotCaches.Create(xlDatabase, Cells(1, 1).CurrentRegion)
Set pt = ActiveSheet.PivotTables.Add(PivotCache, tabledestination:=("pivot!A3"))
    With pt
        PivotFields.Subtotals(1) = False
        .InGridDropZones = True
        .RowAxisLayout xlTabularRow
        .PivotFields("Apple").Orientation = xlRowField
        .PivotFields("Apple Qty").Orientation = xlDataField
        End With

InformationsquelleAutor GimGanDi | 2013-09-16

Schreibe einen Kommentar