0

Hi All,

Does anyone know how to interrupt a Do While Loop?

I have a very simple bit of code that Loops though the items in a ListBox so long as a boolean (blnPaused) = False. There is a Button on the Form that sets the boolean to True but I can't figure out how to get the Click Event to work when the Do While Loop is running.

Any help would be greatly appreciated.

Thanks,

Chris (the Progress Bar is still driving me nuts!).

2
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Chris147
0

Okay, I think I can't scratch this one - it just doesn't seem possible...

Thanks for looking,

Chris.

0

If you are using vb 2005 then use this in your loop.

Do While Boolean
    .......
    .......
    My.Application.Doevents
Loop
0

Like all the best solutions - simple when you know how. It's the knowing how beforehand...

Thank you waynespangler!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.