Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sub in "thread"

Hello,

I need to have a sub, which`ll be run every 5 seconds. How can I do it in
VBA?
I tried with :
while loop
+doEvents
+getMilis (from "kernel.dll")

but it makes 100% CPU usage and blocks Excel.
Is there any metod similar to threads (Timer) or sth. like this?

Thanks in advance!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Sub in "thread"

Look at OnTime in Help, and/or see http://www.cpearson.com/excel/ontime.htm

--

HTH

RP
(remove nothere from the email address if mailing direct)


"M³ody" wrote in message
...
Hello,

I need to have a sub, which`ll be run every 5 seconds. How can I do it in
VBA?
I tried with :
while loop
+doEvents
+getMilis (from "kernel.dll")

but it makes 100% CPU usage and blocks Excel.
Is there any metod similar to threads (Timer) or sth. like this?

Thanks in advance!




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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Text Thread "Return" Without Leaving the Cell ConfusedNHouston Excel Discussion (Misc queries) 1 February 25th 08 04:31 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
Should I generally request "post a poll" when I post a new thread? Joe Miller Excel Discussion (Misc queries) 2 January 7th 06 04:46 PM
Can you get a log of the "thread" of lines used, when your macro run? Marie J-son[_2_] Excel Programming 1 November 7th 04 08:39 PM


All times are GMT +1. The time now is 08:35 AM.

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"