I have a spreadsheet that links to our CRM application called "Account Advanced Find View.xlsx". On a daily basis, I want the spreadsheet to open and then refresh the data. When I manually open the worksheet, it refreshes just fine. I could use the task scheduler to open the file and it will refresh just fine however I have no way to save and close the file.
I decided to have another worksheet perform the task using vba I call the file the "CRMAdvancedFindDailyUpdater.xls" file in which I used the task scheduler to open it. When it opens it automatically runs the following code:
Workbooks.Open Filename:="K:\DataFromCRM\Account Advanced Find View.xlsx", UpdateLinks:=False
Workbooks("Account Advanced Find View.xlsx").RefreshAll
Workbooks("Account Advanced Find View.xlsx").Close SaveChanges:=True
Workbooks("CRMAdvancedFindDailyUpdater.xls").Close SaveChanges:=True
Eventhough I tell it to refresh, it does not. It saves and closes the file and there is no change to the data.
Thanks
Andy
I decided to have another worksheet perform the task using vba I call the file the "CRMAdvancedFindDailyUpdater.xls" file in which I used the task scheduler to open it. When it opens it automatically runs the following code:
Workbooks.Open Filename:="K:\DataFromCRM\Account Advanced Find View.xlsx", UpdateLinks:=False
Workbooks("Account Advanced Find View.xlsx").RefreshAll
Workbooks("Account Advanced Find View.xlsx").Close SaveChanges:=True
Workbooks("CRMAdvancedFindDailyUpdater.xls").Close SaveChanges:=True
Eventhough I tell it to refresh, it does not. It saves and closes the file and there is no change to the data.
Thanks
Andy