A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Thank you for posting your question in the Microsoft Q&A forum.
Based on your sharing, the behavior is that it works when manually clicking Refresh All but it fails when your VB automation runs. I suspect the issue is not due to "bad data", but it can relate to timing/background refresh behavior.
When Excel runs Refresh All, some connection types can refresh in the background. Objects with the BackgroundQuery setting enabled can refresh “in the background,” meaning the call to RefreshAll can return before all connections actually finish updating.
Therefore, I suggest you can first try checking with one affected workbook:
- Run your VB automation but temporarily remove/disable Save + Close after RefreshAll and let Excel finish refreshing completely. After that, save the workbook manually to see if the issue persists.
- In the meantime, also check each connection properties via Data > Queries & Connections > right-click connection > Properties > Uncheck "Enable background refresh" and keep "Refresh this connection on Refresh All" checked.
Please understand that the initial response does not always resolve the issue immediately. However, you can try these steps and let me know if it works for you. If not, we can work together to investigate further.
If you have any questions or need further assistance, please feel free to share them in the comments on this post so I can continue to support you.
Thank you for your understanding and cooperation. I'm looking forward to your reply.
If the answer is helpful, please click "Accept Answer" and kindly upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread