TheTub
TheTub

Reputation: 195

Pause Excel VBA whilst updating external data

I have a macro that is looping. I want to set it going to record dynamic data coming in from an external source.

However, whilst the macro is running it is not allowing the external data to update.

I have tried DoEvents but the data is simply not refreshing from the external source until the macro stops.

Can anyone advise an answer?

Thanks

TT

Upvotes: 0

Views: 2635

Answers (1)

K_B
K_B

Reputation: 3678

GOOD QUESTION (no matter what the others said) and no code required to answer it. And the answer is: The problem is with the External connections and not with the code.

Go to the ribbon> Data > Connections. Now for each connection there go to Properties and disable Background refresh.

Background refresh is the option that will make the external data update a paralel instead of serial process. Disabling it will put it back in the serial line and your code will have to wait until the refresh is done!

Good luck.

Upvotes: 1

Related Questions