|
-
June 25th, 2001, 09:59 AM
#1
How do I make the Loop to check a Variable every 1 second?
Hello, I need to make a while loop that checks a global Variable every 1 second. I tried to make it with No time limit, but it make the system crash,May be because it is an infinte loop.
thanks,
here is the code:
While Loop_Working
If Global_Flag = True Then
Loop_Working = False
GoTo Handle_Second_One
End If
Wend
Eli
-
June 25th, 2001, 10:04 AM
#2
Re: How do I make the Loop to check a Variable every 1 second?
-
June 25th, 2001, 10:05 AM
#3
Re: How do I make the Loop to check a Variable every 1 second?
Because Visual basic only operates on a single execution thread, the code that you want to set the global flag can never be set.
You could include a DoEvents in the loop such that whatever event sets the global variable may fire.
HTH,
D
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|