at the same time macros

Please post any questions regarding the program here.

Moderator: 2020vision

at the same time macros

Postby alrodopial » Fri Jan 27, 2012 9:48 am

Hi,

From excel I download data from e.g 3 web pages at sheet 1.
The pages are different each other and their position at sheet1 is different.
Can excel run the 3macros at the same time so I can get my data at the same time? (aprox)

Or do I have to open 3 more workbooks each to run one macro ( by sending them the signal to start the macro) and get back from each workbook the data I want?

or do I need 3 more instances of excel?
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm

Postby Captain Sensible » Fri Jan 27, 2012 12:04 pm

I can't see any reason why you'd have any problem having one sheet doing 3 web queries. As regards the same time, nothing on a computer is ever really done at the same time and some sort of queuing will be done.

I've had a sheet pulling data from 4 different pages in the past to the same sheet to calculate football prices and didn't have problems. It was basically 4 web queries in a macro.

Depending on how long it takes to grab each page it might be worth looking at how you order the 'grabs' sequence to ensure the data is grabbed as close as possible to the same time.

The 3 web pages isn't a problem I guess it all rests on your meaning of same time as I'm sure excel would just step thru any code line by line rather than threading each request
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Postby alrodopial » Fri Jan 27, 2012 12:29 pm

Each "grabbing" takes about 0,5sec so ideally I want the data from these 3 pages to be in my sheet in 0,5sec

Line by line stepping will need 1,5sec to grab the data
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm

Postby Captain Sensible » Fri Jan 27, 2012 1:38 pm

I don't think VBA can multi thread so you'd need to be looking at firing some external program from VBA for all 3 requests to happen 'simultaneously' probably by writing your own COM object

have a look at these


http://www.excelhero.com/blog/2010/05/m ... d-vba.html

http://www.dailydoseofexcel.com/archive ... ttp-calls/
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Postby alrodopial » Fri Jan 27, 2012 4:02 pm

Thanks a lot captain, very useful links
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm


Return to Help

Who is online

Users browsing this forum: To54 and 36 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.