Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Run a macro continuously

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Run a macro continuously



On Dec 14, 1:40 pm, wrote:
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?


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

Mike

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Run a macro continuously

application.ontime helped.
Thanks

Mike Woodhouse wrote:
On Dec 14, 1:40 pm, wrote:
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?


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

Mike


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing cells continuously LindaV Excel Worksheet Functions 4 March 2nd 09 10:42 PM
Leave Cell Blank Continuously Neon520 Excel Worksheet Functions 1 April 1st 08 09:31 PM
procedure continuously being called nathan Excel Programming 9 January 19th 06 08:40 PM
Need continuously running macro when conditions are met Cynthia[_3_] Excel Programming 1 February 7th 04 05:07 PM
Continuously accessible form SS[_3_] Excel Programming 2 January 15th 04 03:27 PM


All times are GMT +1. The time now is 10:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"