Refreshing external data

G

Guest

Sorry - Back again
Can anyone help with this?
It probably is a one liner, but I have some code that does a lot of work but
I need something that will refesh the external data. I have timed each time
after some data is changed for it refresh and takes about 8 seconds. I have
put a pause into the code of 12 seconds and still it doesnt want to work.
Help greatly appreciated
John
 
D

Dave Peterson

Maybe...

Rightclick on your data|query range and select Data Range Properties.
Try changing the "enable background refresh" to off.

In code, something like:
worksheets("Sheet1").QueryTables(1).Refresh Backgroundquery:=false
 
G

Guest

Thank you Dave for your help.
Unfortunately it hasnt solved the problem. It has stopped the data box from
appearing, but the code stops saying that it is refreshing in the background.
I inserted a 12 second pause to give it time, but this still didnt work.
Regards
John
 
D

Dave Peterson

I don't work with queries, but you're getting a message that says that it's
refreshing in the background with that setting turned off??????
 
G

Guest

Hi Dave,
I have tried with it turned on and off, and when I think it is refreshing in
the background (because it says its refreshing down in the bottom left hand
side of the screen) and no dialouge box appears, I got all excited, but the
end result was if nothing happened. I think I will give up on this one or
maybe run a macro manually each time after it refreshes. The macro basically
copies the info into different tabs.
Many thanks for your help
Best regards
John
 
D

Dave Peterson

I'm out of ideas.

Sorry.
Hi Dave,
I have tried with it turned on and off, and when I think it is refreshing in
the background (because it says its refreshing down in the bottom left hand
side of the screen) and no dialouge box appears, I got all excited, but the
end result was if nothing happened. I think I will give up on this one or
maybe run a macro manually each time after it refreshes. The macro basically
copies the info into different tabs.
Many thanks for your help
Best regards
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top