Results 1 to 5 of 5

Thread: Controlling the Flow!

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    Wink 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

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    anyone?

  3. #3
    patricktully
    Guest
    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.

  4. #4
    Hyperactive Member
    Join Date
    Dec 2000
    Location
    Denver
    Posts
    265
    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

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    Talking

    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
  •  



Click Here to Expand Forum to Full Width