Hi, my VBA code opens a number of Excel files and refresh them, but some files take longer than others to refresh, and one or two of these files always causes this Run-time error 1004. Eventhough the attached image shows the error saying it couldn't get data from the external data source, I think the issue really has to do with the refresh going over VBA's tolerance limit and VBA just shuts down and give up. When I refreshed this same file manually, the file refreshed ok but took 3 minutes. Is there a way to insert a line in the code to force the code to give it more time to refresh the file?