I've been having a major issue... well maybe not major, but I've been trying to figure this out since yesterday lunchtime.
I have the following code:
Application.CutCopyMode = False
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"Data!R7C1:R5000C40").CreatePivotTable TableDestination:= _
"'[Master-File.xls]Analyse'!R20C14", TableName:="certain_view", DefaultVersion _
-> :=xlPivotTableVersion10
The runtime error is in the line with the arrow, but the entire bit quoted above highlights yellow.
Application-defined or object-defined error
I am using Excel 2003, VBA. I have these few lines of script in my code five times, and only this bit fails every time. I am trying to create the fifth PivotTable with these lines.
I think it might have something to do with the amount of data in memory... yet the Application.Cutopymode = False doesn't fix anyhting.