PivotCache.Create unable to handle large Range
问题 This run ok: Dim pc As PivotCache With tgtBook.Sheets("Data") Set pc = tgtBook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=Range("A1:B5"), Version:=Excel.xlPivotTableVersion14) ' Range("myMthdata")) End With The throws a Run-time error '13' Type mismatch: Dim pc As PivotCache With tgtBook.Sheets("Data") Set pc = tgtBook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:=Range("A1:B500000"), Version:=Excel.xlPivotTableVersion14) ' Range("myMthdata")) End With The only difference