Refresh Data not working

ac3100

Board Regular
Joined
Aug 21, 2002
Messages
185
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
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,224,526
Messages
6,179,322
Members
452,906
Latest member
Belthazar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top