Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / December 2006

Tip: Looking for answers? Try searching our database.

Run a macro continuously

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vernalGreens@gmail.com - 14 Dec 2006 13:40 GMT
My macro fetches data from a website. I want this macro to get the data
every 30 seconds.

So I've inserted a time delay. Here's the code.

Start = Timer ' Set start time.
Do While Timer < Start + 30
 DoEvents ' Yield to other processes.
Loop

After going through this piece of code, I want to get new data from the
website. So the macro should run automatically after every 30 seconds.
How can I achieve this?
Mike Woodhouse - 14 Dec 2006 16:01 GMT
On Dec 14, 1:40 pm, vernalGre...@gmail.com wrote:
> My macro fetches data from a website. I want this macro to get the data
> every 30 seconds.
[quoted text clipped - 9 lines]
> website. So the macro should run automatically after every 30 seconds.
> How can I achieve this?

You might want to take a look at Application.OnTime (just search the
VBA help for "OnTime").

Mike
vernalGreens@gmail.com - 15 Dec 2006 07:16 GMT
application.ontime helped.
Thanks

> On Dec 14, 1:40 pm, vernalGre...@gmail.com wrote:
> > My macro fetches data from a website. I want this macro to get the data
[quoted text clipped - 15 lines]
>
> Mike
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.