Hi,
I have a problem updating a Pivot Table with VBA.
The code stops on the line :
Sheets(1).PivotTables("Pivottable1").ChangePivotCache ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:="C:\ANNE\EXCEL\[CMD - 2010.xlsm]Sheet2!R8C1:R2000C15", Version:=xlPivotTableVersion14)
but if I change the name of the file to "CMD2010.xlsm", then the following line does work :
Sheets(1).PivotTables("Pivottable1").ChangePivotCache ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:="C:\ANNE\EXCEL\[CMD2010.xlsm]Sheet2!R8C1:R2000C15", Version:=xlPivotTableVersion14)
Please help me, as I my file is used my many users, and it's difficult to change the name.
Thanks,