Web queries: button v code

  • Thread starter Thread starter Peter Jamieson
  • Start date Start date
P

Peter Jamieson

G'day all,
I have a sheet with a button. To the button is attached
a macro. The macro retrieves data via a web query
and collects the data into an Access table. The button
is manually activated a variable number of times during the day,
sometimes several times, sometimes more than 100 times.
The web queries are not identical but pick up an ID number
before each run.
Everything works OK.
I decided to automate this manual procedure by replacing
the manual part by code which feeds the new ID number to
the web query each time. However the code usually runs for
anything from approx 15 to 80 times then hangs.
Task Manager indicates Excel is using something like
40MB. I have tried various things such as deleting the sheet
and restablishing the query each time but to no avail.
The fact that the web query seems to run any number of times
when manually fired seems to suggest that there may be a timing
issue here but only a guess.
Any suggestions appreciated!
Cheers, Peter J.
 
hi,
without seeing the code, i can only guess but i would have
a hard look at the code you used to automate the manual
pocess. this is what changed.
It may be caught in a loop.
 

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

Back
Top