ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Web queries: button v code (https://www.excelbanter.com/excel-programming/315761-web-queries-button-v-code.html)

Peter Jamieson[_2_]

Web queries: button v code
 
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.




No Name

Web queries: button v code
 
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.

-----Original Message-----
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.



.



All times are GMT +1. The time now is 05:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com