|
-
May 9th, 2001, 12:38 PM
#1
Thread Starter
PowerPoster
Controlling the Flow!
How do I pause my sub from executing the rest of the code until the Call from the other sub is finished?
Code:
'for example
If then
Do While
Loop
cmdSubmitAll_Click 'I want to wait here while cmdSubmitAll_Click executes
Do While
Loop
End I
-
May 9th, 2001, 01:05 PM
#2
Thread Starter
PowerPoster
-
May 9th, 2001, 01:17 PM
#3
Your code should wait automatically until the call to the sub is complete. That is the way VB code works, unless you are using API calls to manipulate the system and use threads.
-
May 9th, 2001, 02:47 PM
#4
Hyperactive Member
use a timer and a flag. Declare a public variable - boolean - for the flag. Set the timer to execute ever x interval if the flag = true, and at the end of the timer's code set the flag back to false. Somewhere in the code for cmdSubmitAll_Click set the flag to true.
Fin
-
May 9th, 2001, 03:40 PM
#5
Thread Starter
PowerPoster
Acoustic that is exactly what I came up with! Glad to know we progammers can think alike.
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
|