VBABEGINER
Well-known Member
- Joined
- Jun 15, 2011
- Messages
- 1,284
- Office Version
- 365
- Platform
- Windows
Getting an error on this..
Run time error 1004
Analysis.xlsx could not be found.
Path is correct.. What it can be, pls guide..
Run time error 1004
Analysis.xlsx could not be found.
Path is correct.. What it can be, pls guide..
Code:
Range("A4").Select
ActiveSheet.PivotTables("PivotTable2").ChangePivotCache ActiveWorkbook. _
PivotCaches.Create(SourceType:=xlDatabase, SourceData:=Pth & "\" & "[ANALYSIS.xlsx]Details!A:AF", Version:=xlPivotTableVersion14)
Sheets("Tie").Select
Range("B4").Select
ActiveSheet.PivotTables("PivotTable2").PivotCache.Refresh