Updating please wait
Refresh 'Set background-refresh value back to original value obj Connection. Background Query = b Background Next Msg Box "Finished refreshing all data connections" End Sub The Msg Box is for testing only and can be removed once you're happy the code waits.Also, I prefer This Workbook to Active Workbook as I know it will target the workbook where the code resides, just in case focus changes.
Going that route lets you work on the resulting data once the web request completes, just like if you turn off "Enable background refresh." The nice thing is though, Excel displays a progress bar during the request, instead of just freezing up / showing a load message in the destination cell.
This table would be deleted at the beginning of the procedure, then, using "Application.
On Time," a Sub would run every 15 seconds or so checking to see if the faux table had been populated. On Time" checker and proceed with the rest of your procedure. I was having this same problem, and tried all the above solutions with no success.
Refresh All to bring new data in from an XML source, and then performs multiple modifications to it.
The problem is that not enough time is given for the Refresh All command to finish, so the following subs and functions end up not executing correctly, which result in repeated rows not being correctly erased. Wait and the Sleep function, but they seem to pause the refresh process too.