QUERY halts VBA

S

sharon

Hi,

I have a macro with 4 querys to URL files.
When I debug the macro manually it works OK, but when executing the macro,
VBA halts and wait for USER input. If I select to "Continue" everything goes
fine.

How can I avoid this step?

TIA,
Sharon
 
J

Joel

What does the continue box say?

Usually if your are perfroming a query more than once you are overwriting
the previous data and the message box verifies that you want to overwrite the
previous query data. Onme solution is to write each query to its own
worksheet.
 
S

sharon

Hi Joel,

Message box says
"Code execution has been interrupted "
Then you have Continue, Debug or Help buttons

As said, when Continuing program runs until next halt (QUERY) and so on.

It seems to me it has relation with time between steps in the code, but I
never saw this before. Something to do with QUERY settings perhaps?



Sharon,
 
S

sharon

Hi,

Internet is really helpful !

I found somebody had exactly the same troubles. Solution came after
inserting at the beginning of the code:

Application.EnableCancelKey = xlDisabled

All run fine now!

HTH,
Sharon
 

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