A pivot table in my Excel file is connected to a local SAS file(*.sas7bdat) in my Laptop.
After my laptop was updated from Win97 to Win10, I could not refresh the pivot table becasue of the run time error 1004 in Excel 2016.
I already installed the "SAS Add-In for MS office" and SAS ODBC driver(9.3 & 9.4 version both) into my laptop and tried to refresh the pivot table as the macro below but the run time error 1004 in Excel 2016 is happened with the ".PivotCache.Refresh" macro.
Could you let me know how I can fix it.
Workbooks.Open Filename:="C:\temp\QI_Detail_Body.xlsm"
Application.EnableEvents = True
ActiveSheet.Unprotect
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
Range("F1").Value = Update_date