Automation

wailingrecluse

Registered User.
Local time
Today, 00:29
Joined
Feb 10, 2009
Messages
50
Hi there

I hope someone can help.

I have a web query in an excel spreadsheet, which refreshes every 2 minutes.

Does anyone know how to automate a macro, so that it runs when the web query has refreshed?

Thanks a lot,

WR
 
how about using a timer and resetting it every 2 minutes? wouldn't that work?
 
Hi

Is this something I need to write in VBA?

Or is it a setting?

WR
you need to write it in your code. something like this:
Code:
dim starttime as variant, secondsBeforeRefresh as variant

while time() < 17:00
starttime = timer()
     secondsBeforeRefresh = 120
          while starttime < secondsBeforeRefresh 
               do events
          wend
                   PERFORM YOUR MACRO HERE
wend
something like that should run your macro after every two minutes is passed from the time it is initiated until 5pm at night. the time code might have to be changed a tad though. i probably wrote it incorrectly. it was not tested.
 

Users who are viewing this thread

Back
Top Bottom