View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Vepa Vepa is offline
external usenet poster
 
Posts: 10
Default Updating large pivot source data

Hello,

I'm experiencing the following problem with a very simple macro in Excel
2007 to update pivot table data source. That is, my data has more than 74000
rows and I'm trying to update the source data with the following code:

Sub Macro1()
Dim rng1 As Range
Set rng1 = Sheets("Test_sheet").Range("A1:A74000")
ActiveSheet.PivotTables("Pivot-taulukko1").ChangePivotCache
ActiveWorkbook. _
PivotCaches.Create(SourceType:=xlDatabase, SourceData:=rng1, _
Version:=xlPivotTableVersion12)
End Sub

The problem is that the code works if the source data is less than 65536
rows long but if I change the source data to range to row 65537 the code
stops to work and I get an error Run time error '13' Type mismatch.

Could somebody now help me with this issues to get this issue fixed?

Best regards
Vepa